Opened 17 years ago
Last modified 17 years ago
#26 closed Feature Request
Setting Color with words — at Version 3
Reported by: | JamesB | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | Severity: | ||
Keywords: | Color, colour, words, autoit, guictrl, gui, ctrl, control | Cc: |
Description (last modified by Gary)
I don't think this has been suggested, but could we have AutoIt allow words like:
Blue
Red
Green
Yellow
etc
Be supported in the syntax? GuiCtrlSetColor($MyControl, "Blue") or GuiCtrlSetBkColor("Blue")
Thanks!
Look in Constants.au3 you'll find some of the colors already defined:
; Colour Constants RGB Hex
Global Const $COLOR_AQUA = 0x00FFFF
Global Const $COLOR_BLACK = 0x000000
Global Const $COLOR_BLUE = 0x0000FF
Global Const $COLOR_CREAM = 0xFFFBF0
Global Const $COLOR_FUCHSIA = 0xFF00FF
Global Const $COLOR_GRAY = 0x808080
Global Const $COLOR_GREEN = 0x008000
Global Const $COLOR_LIME = 0x00FF00
;~ Global Const $COLOR_MAROON = 0x800000
Global Const $COLOR_MAROON = 0x8B1C62
Global Const $COLOR_MEDBLUE = 0x0002C4
Global Const $COLOR_MEDGRAY = 0xA0A0A4
Global Const $COLOR_MONEYGREEN = 0xC0DCC0
Global Const $COLOR_NAVY = 0x000080
Global Const $COLOR_OLIVE = 0x808000
Global Const $COLOR_PURPLE = 0x800080
Global Const $COLOR_RED = 0xFF0000
Global Const $COLOR_SILVER = 0xC0C0C0
Global Const $COLOR_SKYBLUE = 0xA6CAF0
Global Const $COLOR_TEAL = 0x008080
Global Const $COLOR_WHITE = 0xFFFFFF
Global Const $COLOR_YELLOW = 0xFFFF00
Global Const $CLR_NONE = 0xFFFFFFFF
; Color Constants BGR Hex
Global Const $CLR_AQUA = 0xFFFF00
Global Const $CLR_BLACK = 0x000000
Global Const $CLR_BLUE = 0xFF0000
Global Const $CLR_CREAM = 0xF0FBFF
Global Const $CLR_DEFAULT = 0xFF000000
Global Const $CLR_FUCHSIA = 0xFF00FF
Global Const $CLR_GRAY = 0x808080
Global Const $CLR_GREEN = 0x008000
Global Const $CLR_LIME = 0x00FF00
;~ Global Const $CLR_MAROON = 0x000080
Global Const $CLR_MAROON = 0x621C8B
Global Const $CLR_MEDBLUE = 0xC40200
Global Const $CLR_MEDGRAY = 0xA4A0A0
Global Const $CLR_MONEYGREEN = 0xC0DCC0
Global Const $CLR_NAVY = 0x800000
Global Const $CLR_OLIVE = 0x008080
Global Const $CLR_PURPLE = 0x800080
Global Const $CLR_RED = 0x0000FF
Global Const $CLR_SILVER = 0xC0C0C0
Global Const $CLR_SKYBLUE = 0xF0CAA6
Global Const $CLR_TEAL = 0x808000
Global Const $CLR_WHITE = 0xFFFFFF
Global Const $CLR_YELLOW = 0x00FFFF
; Color Dialog constants
Global Const $CC_ANYCOLOR = 0x100
Global Const $CC_FULLOPEN = 0x2
Global Const $CC_RGBINIT = 0x1
Change History (3)
comment:1 in reply to: ↑ description Changed 17 years ago by JdeB
comment:2 follow-up: ↓ 3 Changed 17 years ago by Saunders
Where do you draw the line though? Blue, sure. Dark Blue, Light Blue? Fuschia? Lawn Green? Lavendar Blush? Medium Aqua Marine? Light Golden Rod Yellow?
There are a lot of colours out there, even if you go by the W3C's HTML colour names list.
So which ones should get added? I prefer the idea of an include personally, with colours defined like $COLOR_BLUE, etc.
Hope I was allowed to comment here...
comment:3 in reply to: ↑ 2 Changed 17 years ago by Gary
- Description modified (diff)
Replying to Saunders:
Where do you draw the line though? Blue, sure. Dark Blue, Light Blue? Fuschia? Lawn Green? Lavendar Blush? Medium Aqua Marine? Light Golden Rod Yellow?
There are a lot of colours out there, even if you go by the W3C's HTML colour names list.
So which ones should get added? I prefer the idea of an include personally, with colours defined like $COLOR_BLUE, etc.
Hope I was allowed to comment here...
Why don't you just define the variable $Red, $Blue etc and use those in stead of trying to build this in?