Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#26 closed Feature Request (Rejected)

Setting Color with words

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!

Attachments (0)

Change History (10)

in reply to:  description comment:1 by Jos, 18 years ago

Why don't you just define the variable $Red, $Blue etc and use those in stead of trying to build this in?

comment:2 by Saunders, 18 years ago

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...

in reply to:  2 comment:3 by Gary, 18 years ago

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...

comment:4 by Gary, 18 years ago

Description: modified (diff)

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

comment:5 by Jos, 18 years ago

Resolution: rejected
Status: newclosed

comment:6 by Jos, 18 years ago

Version: 3.2.10.0

comment:7 by Jos, 18 years ago

Milestone: Future Release
Version: 3.2.10.0

in reply to:  4 comment:8 by anonymous, 18 years ago

Replying to Gary:

Look in Constants.au3 you'll find some of the colors already defined:

Actually I knew that, which was why I found it preferable. :)

comment:9 by JamesB <james@…>, 18 years ago

Ahh right yeah. Didn't know this, I saw it in VB and thought it would be useful!

comment:10 by TicketCleanup, 18 years ago

Version: 3.2.10.0

Automatic ticket cleanup.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.