I have issues with colors & finally realize why...say I have 20 buttons, 5 labels, 10 entry boxes, and other goodies. Things like buttons can have 8 diff color types (bg, fg, active gb...) per button...that's a lot....I make my project and may notice some colors mismatch slightly (due to typos/mixup like fg with bg). Anyhow, even after that is taken care of, maybe later on decide I want the orange color to be lighter (EVERYWHERE)...now I have to find and edit all these occurrences in all element (where used). I may do that in the code , one by one. If I open page someday, then it mismatches the code edits.
There is a page "color pref setup", but it needs a lift. There needs to be user names assigned, so that those can later be changed in software using THE NAME. So in page color pref you might set up
myDarkGrn= #231A6B
myLight_Green= #138C4A
LogosColor= #543B12
etc
Then when you add a button you could , for example , set the active bg to LogosColor and fg to myDarkGrn
If later on, the program decides Logos color needs varied, it can & all items using it will change together.
Page will still pop up with the RGB "number generator " for objects, where you don't want to use a user named colors.
Also, it would be nice if the color attributes were together in the attribute list ---they are sorta scattered (by alphabetical) .
By the way, note tooltip text and some others xpad ypad are not in order, so the list is already in semi-alpha order. ....might as well group the color items together.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-06-27
Hi Greg:
Thanks for the chart, however that doesn 't help for user colors....for example say a bunch of stuff needs set to Ford Blue. I am also using my rather specific PanelYellow #FFDE00 and a PanelGreen of #367C2B (which matches the physical devices color scheme) ...so I want to be able to name them so page code also uses the names (in case I tweak them later, to match other items).
Yes, you would be able to select from usder named preferences, or use the color picker popup. The color picker just becomes one tool of choosing the color.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could use the color section of the preferences menu if you mainly want to set a single color to most or all of your widgets.
Or you could set the color as a variable PanelGreen="#367c2b" and then in your start up routine, set the widgets to that color...
widgs = [_w1.Label2,_w1.Label3,_w1.Label5,]
for wid in widges:
wid.configure(background=PanelGreen
But I'm thinking you want PAGE to support any and all custom colors you might possibly come up with when you click the "...." button in background/foreground/active color attributes.
I'll pass it up to Don, but I think that's asking a bit too much.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-06-27
You could use the color section of the preferences menu if you mainly want to set a single color to most or all of your widgets....BUT page will not generate a name in the code (as far as I know), so you can't edit/update it later and have the objects update.
Modify the page color pref screen to include a name field and color & add to a list (or perhaps already have spots for , say, 10 user colors). These are stored as part of the project info.
In the attributes color fields, if you click on the dotted color icon, it pops up with a menu that includes the list of user names, you can pick one for that color field (field then shows the name when complete, like myBloodRed). If a user named color is used, page coding will assign a color to the name and use that name where needed. Or you can pick from the normal color chooser & the fields fills with a code, like #21AB3E...does that seem straightforward?
page generates
myRedColor = "#3a4b5c"
btnCallFreddy.config(bg=myRedColor)
btnFrogJump.config(fg=myRedColor)
etc
So later, if the color needs tweaked slightly, it only requires editing the parameter
By the way, I'm assuming that bg=myRedColor, only establishes the bg at that moment (rather than a linked relationship, like text var)...so if myRedColor is changed by code, objects already drawn don't change.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-06-27
That's funny--I just noticed there is now a 7.4 download (I updated a few months ago), that mentions something about picking colors and global colors...does this do what I am referring to? I cannot upgrade right at the moment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have issues with colors & finally realize why...say I have 20 buttons, 5 labels, 10 entry boxes, and other goodies. Things like buttons can have 8 diff color types (bg, fg, active gb...) per button...that's a lot....I make my project and may notice some colors mismatch slightly (due to typos/mixup like fg with bg). Anyhow, even after that is taken care of, maybe later on decide I want the orange color to be lighter (EVERYWHERE)...now I have to find and edit all these occurrences in all element (where used). I may do that in the code , one by one. If I open page someday, then it mismatches the code edits.
There is a page "color pref setup", but it needs a lift. There needs to be user names assigned, so that those can later be changed in software using THE NAME. So in page color pref you might set up
myDarkGrn= #231A6B
myLight_Green= #138C4A
LogosColor= #543B12
etc
Then when you add a button you could , for example , set the active bg to LogosColor and fg to myDarkGrn
If later on, the program decides Logos color needs varied, it can & all items using it will change together.
Page will still pop up with the RGB "number generator " for objects, where you don't want to use a user named colors.
Also, it would be nice if the color attributes were together in the attribute list ---they are sorta scattered (by alphabetical) .
By the way, note tooltip text and some others xpad ypad are not in order, so the list is already in semi-alpha order. ....might as well group the color items together.
The PAGE colour dialog uses a "standard" tk color dialog that does not provide colour names.
I created the one that is attached to this post.
If you are on Linux (and I think on Mac OSC) you can find a file called rgb.txt which is in /etc/X11 folder, which I have also attached.
There are various color charts that have the same thing on the Internet by searching for "Tkinter Color Chart".
Last edit: Greg Walters 2022-06-27
Hi Greg:
Thanks for the chart, however that doesn 't help for user colors....for example say a bunch of stuff needs set to Ford Blue. I am also using my rather specific PanelYellow #FFDE00 and a PanelGreen of #367C2B (which matches the physical devices color scheme) ...so I want to be able to name them so page code also uses the names (in case I tweak them later, to match other items).
Yes, you would be able to select from usder named preferences, or use the color picker popup. The color picker just becomes one tool of choosing the color.
You could use the color section of the preferences menu if you mainly want to set a single color to most or all of your widgets.
Or you could set the color as a variable PanelGreen="#367c2b" and then in your start up routine, set the widgets to that color...
widgs = [_w1.Label2,_w1.Label3,_w1.Label5,]
for wid in widges:
wid.configure(background=PanelGreen
But I'm thinking you want PAGE to support any and all custom colors you might possibly come up with when you click the "...." button in background/foreground/active color attributes.
I'll pass it up to Don, but I think that's asking a bit too much.
Greg
You could use the color section of the preferences menu if you mainly want to set a single color to most or all of your widgets....BUT page will not generate a name in the code (as far as I know), so you can't edit/update it later and have the objects update.
Modify the page color pref screen to include a name field and color & add to a list (or perhaps already have spots for , say, 10 user colors). These are stored as part of the project info.
In the attributes color fields, if you click on the dotted color icon, it pops up with a menu that includes the list of user names, you can pick one for that color field (field then shows the name when complete, like myBloodRed). If a user named color is used, page coding will assign a color to the name and use that name where needed. Or you can pick from the normal color chooser & the fields fills with a code, like #21AB3E...does that seem straightforward?
page generates
myRedColor = "#3a4b5c"
btnCallFreddy.config(bg=myRedColor)
btnFrogJump.config(fg=myRedColor)
etc
So later, if the color needs tweaked slightly, it only requires editing the parameter
By the way, I'm assuming that bg=myRedColor, only establishes the bg at that moment (rather than a linked relationship, like text var)...so if myRedColor is changed by code, objects already drawn don't change.
That's funny--I just noticed there is now a 7.4 download (I updated a few months ago), that mentions something about picking colors and global colors...does this do what I am referring to? I cannot upgrade right at the moment.