Jump to content
Sign in to follow this  
Fortytwo

ColorConstantsEx - 400 classic color names + Display Tool

Recommended Posts

Hi,

Well how about if you dye in your next project the GUI in $RAL_SKYBLUE, plus buttons in $RAL_GRASSGREEN and with $RAL_LIGHTGRAY Scripture?

Or maybe you prefer buttons in $RAL_ZINCYELLOW with $RGB_Red70 Scripture?

So here is my ColorConstantsEx with a total of 404 colors, including:

- The entire range of RAL Classic

- 34 different skin tones

- The basic colors red, yellow, green, cyan, blue, magenta, black / white in each of 10 levels of brightness

- Other common color names

Hence the color choice is hopefully a bit easier, and the script's also looks good and clear.

; #INDEX# =======================================================================================================================
; Title .........: ColorConstantsEx
; AutoIt Version : 3.3
; Language ......: English
; Description ...: Constants with classical Shade of color
; Author ........: Deep Thought (www.autoit.de)
; Date ..........: 26.8.2011
; ===============================================================================================================================
#include-once


; #CONSTANTS# ===================================================================================================================
#Region RAL CLASSIC - shade of color

;Shade of yellow
    Global Const $RAL_DAFFODILYELLOW       = 0xE37A1F ;RAL 1007
    Global Const $RAL_GOLDENYELLOW         = 0xE39624 ;RAL 1004
    Global Const $RAL_SUNYELLOW            = 0xF39F18 ;RAL 1037
    Global Const $RAL_PASTELYELLOW         = 0xEFA94A ;RAL 1034
    Global Const $RAL_SAFFRONYELLOW        = 0xFFAB59 ;RAL 1017
    Global Const $RAL_TRAFFICYELLOW        = 0xFAD201 ;RAL 1023
    Global Const $RAL_RAPEYELLOW           = 0xF3DA0B ;RAL 1021
    Global Const $RAL_LUMINOUSYELLOW       = 0xFFFF00 ;RAL 1026
    Global Const $RAL_ZINCYELLOW           = 0xF8F32B ;RAL 1018
    Global Const $RAL_SULFURYELLOW         = 0xFFF542 ;RAL 1016
    Global Const $RAL_IVORY                = 0xF0D6AB ;RAL 1014
    Global Const $RAL_LIGHTIVORY           = 0xFCEBCC ;RAL 1015
    Global Const $RAL_OYSTERWHITE          = 0xFFF5E3 ;RAL 1013
    Global Const $RAL_PEARLGOLD            = 0x927549 ;RAL 1036
    Global Const $RAL_BROWNBEIGE           = 0xAD7A4F ;RAL 1011
    Global Const $RAL_HONEYYELLOW          = 0xC98721 ;RAL 1005
    Global Const $RAL_MAIZEYELLOW          = 0xE4A010 ;RAL 1006
    Global Const $RAL_LEMONYELLOW          = 0xE3B838 ;RAL 1012
    Global Const $RAL_DAHLIAYELLOW         = 0xF3A505 ;RAL 1033
    Global Const $RAL_MELONYELLOW          = 0xF4A900 ;RAL 1028
    Global Const $RAL_CURRY                = 0x9D9101 ;RAL 1027
    Global Const $RAL_BROOMYELLOW          = 0xD6AE01 ;RAL 1032
    Global Const $RAL_SIGNALYELLOW         = 0xE5BE01 ;RAL 1003
    Global Const $RAL_OLIVEYELLOW          = 0x999950 ;RAL 1020
    Global Const $RAL_GRAYBEIGE            = 0x9E9764 ;RAL 1019
    Global Const $RAL_PEARLBEIGE           = 0xA29985 ;RAL 1035
    Global Const $RAL_OCHREYELLOW          = 0xAEA04B ;RAL 1024
    Global Const $RAL_GREENBEIGE           = 0xBEBD7F ;RAL 1000
    Global Const $RAL_SANDYELLOW           = 0xC6A664 ;RAL 1002
    Global Const $RAL_BEIGE                = 0xC2B078 ;RAL 1001

;Shade of orange
    Global Const $RAL_VERMILION            = 0xCC241C ;RAL 2002
    Global Const $RAL_REDORANGE            = 0xC93C20 ;RAL 2001
    Global Const $RAL_PEARLORANGE          = 0xC35831 ;RAL 2013
    Global Const $RAL_SIGNALORANGE         = 0xD84B20 ;RAL 2010
    Global Const $RAL_SALMONRANGE          = 0xDE5247 ;RAL 2012
    Global Const $RAL_LUMINOUSORANGE       = 0xFF2301 ;RAL 2005
    Global Const $RAL_PUREORANGE           = 0xF44611 ;RAL 2004
    Global Const $RAL_TRAFFICORANGE        = 0xF54021 ;RAL 2009
    Global Const $RAL_DEEPORANGE           = 0xED5C29 ;RAL 2011
    Global Const $RAL_BRIGHTREDORANGE      = 0xF75E25 ;RAL 2008
    Global Const $RAL_YELLOWORANGE         = 0xED760E ;RAL 2000
    Global Const $RAL_PASTELORANGE         = 0xFF7514 ;RAL 2003
    Global Const $RAL_LUMINOUSBRIGHTORANGE = 0xFFA420 ;RAL 2007

;Shade of red
    Global Const $RAL_BLACKRED             = 0x412227 ;RAL 3007
    Global Const $RAL_WINERED              = 0x5E2129 ;RAL 3005
    Global Const $RAL_OXIDERED             = 0x642424 ;RAL 3009
    Global Const $RAL_PEARLRUBYRED         = 0x711521 ;RAL 3032
    Global Const $RAL_PURPLERED            = 0x75151E ;RAL 3004
    Global Const $RAL_BROWNRED             = 0x781417 ;RAL 3011
    Global Const $RAL_RUBYRED              = 0x9B111E ;RAL 3003
    Global Const $RAL_SIGNALRED            = 0xA3171A ;RAL 3001
    Global Const $RAL_CARMINERED           = 0xA2231D ;RAL 3002
    Global Const $RAL_TOMATORED            = 0xA12312 ;RAL 3013
    Global Const $RAL_FLAMERED             = 0xAB1F1C ;RAL 3000
    Global Const $RAL_CORALRED             = 0xA62426 ;RAL 3016
    Global Const $RAL_ORIENTRED            = 0xA61C2E ;RAL 3031
    Global Const $RAL_RASPBERRYRED         = 0xB51233 ;RAL 3027
    Global Const $RAL_STRAWBERRYRED        = 0xCF2942 ;RAL 3018
    Global Const $RAL_ROSE                 = 0xE63244 ;RAL 3017
    Global Const $RAL_TRAFFICRED           = 0xCC0605 ;RAL 3020
    Global Const $RAL_LUMINOUSRED          = 0xFC0A1C ;RAL 3024
    Global Const $RAL_LUMINOUS             = 0xFC1414 ;RAL 3026
    Global Const $RAL_PURERED              = 0xE72512 ;RAL 3028
    Global Const $RAL_SALMONPINK           = 0xD95030 ;RAL 3022
    Global Const $RAL_BEIGERED             = 0xCC8273 ;RAL 3012
    Global Const $RAL_PEARLPINK            = 0xB24C43 ;RAL 3033
    Global Const $RAL_ANTIQUEPINK          = 0xD36E70 ;RAL 3014
    Global Const $RAL_LIGHTPINK            = 0xEA899A ;RAL 3015

;Shade of violet
    Global Const $RAL_VIOLET               = 0x60007F ;deleted from the RAL catalog
    Global Const $RAL_BLUELILAC            = 0x633D9C ;RAL 4005
    Global Const $RAL_PEARLBLACKBERRY      = 0x6B6880 ;RAL 4012
    Global Const $RAL_PEARLVIOLET          = 0x8773A1 ;RAL 4011
    Global Const $RAL_SIGNALVIOLET         = 0x7D1F7A ;RAL 4008
    Global Const $RAL_REDLILAC             = 0x824080 ;RAL 4001
    Global Const $RAL_PASTELVIOLET         = 0x9E7394 ;RAL 4009
    Global Const $RAL_CLARETVIOLET         = 0x5C082B ;RAL 4004
    Global Const $RAL_REDVIOLET            = 0x8F2640 ;RAL 4002
    Global Const $RAL_PURPLEVIOLET         = 0x380A2E ;RAL 4007
    Global Const $RAL_TRAFFICPURPLE        = 0x910F66 ;RAL 4006
    Global Const $RAL_TELEMAGENTA          = 0xBF1773 ;RAL 4010
    Global Const $RAL_HEATHERVIOLET        = 0xC9388C ;RAL 4003

;Shade of blue
    Global Const $RAL_BLACKBLUE            = 0x030D1F ;RAL 5004
    Global Const $RAL_STEELBLUE            = 0x231A24 ;RAL 5011
    Global Const $RAL_GRAYBLUE             = 0x1A2938 ;RAL 5008
    Global Const $RAL_COBALTBLUE           = 0x1E213D ;RAL 5013
    Global Const $RAL_SAPHIREBLUE          = 0x001745 ;RAL 5003
    Global Const $RAL_NIGHTBLUE            = 0x252850 ;RAL 5022
    Global Const $RAL_OCEANBLUE            = 0x1D334A ;RAL 5020
    Global Const $RAL_PEARLNIGHTBLUE       = 0x102C54 ;RAL 5026
    Global Const $RAL_GENTIANBLUE          = 0x0E294B ;RAL 5010
    Global Const $RAL_GREENBLUE            = 0x1F3438 ;RAL 5001
    Global Const $RAL_ULTRAMARINEBLUE      = 0x000F75 ;RAL 5002
    Global Const $RAL_SIGNALBLUE           = 0x002E7A ;RAL 5005
    Global Const $RAL_TRAFFICBLUE          = 0x003B80 ;RAL 5017
    Global Const $RAL_BRILLANTBLUE         = 0x264F87 ;RAL 5007
    Global Const $RAL_CAPRIBLUE            = 0x1B5583 ;RAL 5019
    Global Const $RAL_VIOLETBLUE           = 0x354D73 ;RAL 5000
    Global Const $RAL_AZUREBLUE            = 0x025669 ;RAL 5009
    Global Const $RAL_PEARLGENTIANBLUE     = 0x296478 ;RAL 5025
    Global Const $RAL_WATERBLUE            = 0x256D7B ;RAL 5021
    Global Const $RAL_TURQUOISEBLUE        = 0x3F888F ;RAL 5018
    Global Const $RAL_DISTANTBLUE          = 0x49678D ;RAL 5023
    Global Const $RAL_PIGEONBLUE           = 0x606E8C ;RAL 5014
    Global Const $RAL_SKYBLUE              = 0x2271B3 ;RAL 5015
    Global Const $RAL_PASTELBLUE           = 0x578CB5 ;RAL 5024
    Global Const $RAL_LIGHTBLUE            = 0x2973B8 ;RAL 5012

;Shade of green
    Global Const $RAL_BOTTLEGREEN          = 0x1C2617 ;RAL 6007
    Global Const $RAL_BROWNGREEN           = 0x21211A ;RAL 6008
    Global Const $RAL_FIRGREEN             = 0x17291C ;RAL 6009
    Global Const $RAL_OLIVEDRAB            = 0x2B261C ;RAL 6022
    Global Const $RAL_GRAYOLIVE            = 0x292B24 ;RAL 6006
    Global Const $RAL_BLACKGREEN           = 0x1F2E2B ;RAL 6012
    Global Const $RAL_CHROMEGREEN          = 0x263829 ;RAL 6020
    Global Const $RAL_MOSSGREEN            = 0x0A381F ;RAL 6005
    Global Const $RAL_BLUEGREEN            = 0x0D3B2E ;RAL 6004
    Global Const $RAL_BLACKOLIVE           = 0x3B3C36 ;RAL 6015
    Global Const $RAL_OLIVEGREEN           = 0x3D452E ;RAL 6003
    Global Const $RAL_PEARLGREEN           = 0x1B542C ;RAL 6035
    Global Const $RAL_LEAFGREEN            = 0x265721 ;RAL 6002
    Global Const $RAL_GRASSGREEN           = 0x366926 ;RAL 6010
    Global Const $RAL_FERNGREEN            = 0x4A6E33 ;RAL 6025
    Global Const $RAL_EMERALDGREEN         = 0x287233 ;RAL 6001
    Global Const $RAL_MINTGREEN            = 0x127826 ;RAL 6029
    Global Const $RAL_PUREGREEN            = 0x008F39 ;RAL 6037
    Global Const $RAL_SIGNALGREEN          = 0x298A40 ;RAL 6032
    Global Const $RAL_TRAFFICGREEN         = 0x249140 ;RAL 6024
    Global Const $RAL_MAYGREEN             = 0x4C9141 ;RAL 6017
    Global Const $RAL_YELLOWGREEN          = 0x4FA833 ;RAL 6018
    Global Const $RAL_LUMINOUSGREEN        = 0x00BB2D ;RAL 6038
    Global Const $RAL_PINEGREEN            = 0x264A33 ;RAL 6028
    Global Const $RAL_TURQUOISEGREEN       = 0x1E5945 ;RAL 6016
    Global Const $RAL_PEARLOPALGREEN       = 0x005D4C ;RAL 6036
    Global Const $RAL_OPALGREEN            = 0x015D52 ;RAL 6026
    Global Const $RAL_PATINAGREEN          = 0x337854 ;RAL 6000
    Global Const $RAL_RESEDAGREEN          = 0x5E7D4F ;RAL 6011
    Global Const $RAL_REEDGREEN            = 0x6C7156 ;RAL 6013
    Global Const $RAL_PALEGREEN            = 0x85A67A ;RAL 6021
    Global Const $RAL_YELLOWOLIVE          = 0x47402E ;RAL 6014
    Global Const $RAL_BRONZEGREEN          = 0x485746 ;RAL 6031
    Global Const $RAL_MINTTURQUOISE        = 0x428C78 ;RAL 6033
    Global Const $RAL_PASTELTURQUOISE      = 0x7FB5B5 ;RAL 6034
    Global Const $RAL_LIGHTGREEN           = 0x7DCCBD ;RAL 6027
    Global Const $RAL_PASTELGREEN          = 0xBFE3BA ;RAL 6019

;Shade of gray
    Global Const $RAL_BLACKGRAY            = 0x23282B ;RAL 7021
    Global Const $RAL_ANTHRACITEGRAY       = 0x293133 ;RAL 7016
    Global Const $RAL_UMBRAGRAY            = 0x332F2C ;RAL 7022
    Global Const $RAL_GRANITEGRAY          = 0x2F353B ;RAL 7026
    Global Const $RAL_TRAFFICGRAY_B        = 0x404545 ;RAL 7043
    Global Const $RAL_SLATEGRAY            = 0x3D4252 ;RAL 7015
    Global Const $RAL_IRONGRAY             = 0x404A54 ;RAL 7011
    Global Const $RAL_GRAPHITEGRAY         = 0x474A51 ;RAL 7024
    Global Const $RAL_TARPAULINGRAY        = 0x4A4F4A ;RAL 7010
    Global Const $RAL_GREENGRAY            = 0x4D5645 ;RAL 7009
    Global Const $RAL_BASALTGRAY           = 0x4A5459 ;RAL 7012
    Global Const $RAL_BLUEGRAY             = 0x4D5C6B ;RAL 7031
    Global Const $RAL_QUARTZGRAY           = 0x615E59 ;RAL 7039
    Global Const $RAL_BEIGEGRAY            = 0x6B6157 ;RAL 7006
    Global Const $RAL_CONCRETEGRAY         = 0x686C5E ;RAL 7023
    Global Const $RAL_MOUSEGRAY            = 0x616969 ;RAL 7005
    Global Const $RAL_MOSSGRAY             = 0x707061 ;RAL 7003
    Global Const $RAL_GRAY                 = 0x7B765E ;deleted from the RAL catalog
    Global Const $RAL_CEMENTGRAY           = 0x7A8275 ;RAL 7033
    Global Const $RAL_DUSTYGRAY            = 0x7D7F7D ;RAL 7037
    Global Const $RAL_PEARLMOUSEGRAY       = 0x888175 ;RAL 7048
    Global Const $RAL_TELEGRAY2            = 0x78828C ;RAL 7046
    Global Const $RAL_SQUIRRELGRAY         = 0x738591 ;RAL 7000
    Global Const $RAL_SILVERGRAY           = 0x8794A6 ;RAL 7001
    Global Const $RAL_TELEGRAY1            = 0x8F949E ;RAL 7045
    Global Const $RAL_PLATINUMGRAY         = 0x9E969C ;RAL 7036
    Global Const $RAL_WINDOWGRAY           = 0x9EA3B0 ;RAL 7040
    Global Const $RAL_PEBBLEGRAY           = 0xBDBAAB ;RAL 7032
    Global Const $RAL_AGATEGRAY            = 0xBABDBA ;RAL 7038
    Global Const $RAL_SILKGRAY             = 0xC2BFB8 ;RAL 7044
    Global Const $RAL_LIGHTGRAY            = 0xD4D9DB ;RAL 7035
    Global Const $RAL_TELEGRAY4            = 0xD9D6DB ;RAL 7047
    Global Const $RAL_BROWNGRAY            = 0x474238 ;RAL 7013
    Global Const $RAL_KHAKIGRAY            = 0x6A5F31 ;RAL 7008
    Global Const $RAL_DARKYELLOW           = 0x645E46 ;deleted from the RAL catalog
    Global Const $RAL_OLIVEGRAY            = 0x7E7B52 ;RAL 7002
    Global Const $RAL_YELLOWGRAY           = 0x8F8B66 ;RAL 7034
    Global Const $RAL_STONEGRAY            = 0x8B8C7A ;RAL 7030
    Global Const $RAL_TRAFFICGRAY_A        = 0x8F9699 ;RAL 7042
    Global Const $RAL_SIGNALGRAY           = 0x969992 ;RAL 7004

;Shade of brown
    Global Const $RAL_BLACKBROWN           = 0x212121 ;RAL 8022
    Global Const $RAL_MAHOGANYBROWN        = 0x3D1F1C ;RAL 8016
    Global Const $RAL_CHESTNUTBROWN        = 0x4D1F1C ;RAL 8015
    Global Const $RAL_REDBROWN             = 0x541F1F ;RAL 8012
    Global Const $RAL_COPPERBROWN          = 0x85382B ;RAL 8004
    Global Const $RAL_ORANGEBROWN          = 0x9C4529 ;RAL 8023
    Global Const $RAL_OCHREBROWN           = 0x955F20 ;RAL 8001
    Global Const $RAL_GREENBROWN           = 0x826C34 ;RAL 8000
    Global Const $RAL_YELLOWBROWN          = 0xCFAF7F ;deleted from the RAL catalog
    Global Const $RAL_FAWNBROWN            = 0x5E331F ;RAL 8007
    Global Const $RAL_NUTBROWN             = 0x5B3A29 ;RAL 8011
    Global Const $RAL_SIGNALBROWN          = 0x6E3B30 ;RAL 8002
    Global Const $RAL_BEIGEBROWN           = 0x6E4030 ;RAL 8024
    Global Const $RAL_CLAYBROWN            = 0x733B24 ;RAL 8003
    Global Const $RAL_PEARLCOPPER          = 0x773C27 ;RAL 8029
    Global Const $RAL_SEPIABROWN           = 0x38261C ;RAL 8014
    Global Const $RAL_TERRABROWN           = 0x402E21 ;RAL 8028
    Global Const $RAL_CHOCOLATEBROWN       = 0x45322E ;RAL 8017
    Global Const $RAL_GRAYBROWN            = 0x403A3A ;RAL 8019
    Global Const $RAL_LEATHERBROWN         = 0x504938 ;RAL 8027
    Global Const $RAL_OLIVEBROWN           = 0x6F4F28 ;RAL 8008
    Global Const $RAL_PALEBROWN            = 0x664A3D ;RAL 8025

;Shade of white and black
    Global Const $RAL_TARBLACK             = 0x01050E ;RAL 9021
    Global Const $RAL_JETBLACK             = 0x0A0A0A ;RAL 9005
    Global Const $RAL_GRAPHITEBLACK        = 0x0D121A ;RAL 9011
    Global Const $RAL_TRAFFICBLACK         = 0x14171C ;RAL 9017
    Global Const $RAL_SIGNALBLACK          = 0x1C1C21 ;RAL 9004
    Global Const $RAL_GRAYALUMINIUM        = 0x7D7A78 ;RAL 9007
    Global Const $RAL_PEARLDARKGRAY        = 0x7E8182 ;RAL 9023
    Global Const $RAL_PEARLLIGHTGRAY       = 0x9C9C9C ;RAL 9022
    Global Const $RAL_WHITEALUMINIUM       = 0xA6ABB5 ;RAL 9006
    Global Const $RAL_PAPYRUSWHITE         = 0xDBE3DE ;RAL 9018
    Global Const $RAL_GRAYWHITE            = 0xF0EDE6 ;RAL 9002
    Global Const $RAL_CREAM                = 0xFFFCF0 ;RAL 9001
    Global Const $RAL_SATINWHITE           = 0xFDFDFD ;RAL 9020
    Global Const $RAL_PUREWHITE            = 0xFAFFFF ;RAL 9010
    Global Const $RAL_TRAFFICWHITE         = 0xFCFFFF ;RAL 9016
    Global Const $RAL_SIGNALWHITE          = 0xFFFFFF ;RAL 9003
#EndRegion

#Region RGB - color palette
    Global Const $RGB_WHITE            = 0xFFFFFF
    Global Const $RGB_GRAY90           = 0xE6E6E6
    Global Const $RGB_GRAY80           = 0xCCCCCC
    Global Const $RGB_GRAY70           = 0xB3B3B3
    Global Const $RGB_GRAY60           = 0x999999
    Global Const $RGB_GRAY50           = 0x808080
    Global Const $RGB_GRAY40           = 0x666666
    Global Const $RGB_GRAY30           = 0x4D4D4D
    Global Const $RGB_GRAY20           = 0x333333
    Global Const $RGB_GRAY10           = 0x1A1A1A
    Global Const $RGB_BLACK            = 0x000000

    Global Const $RGB_RED              = 0xFF0000
    Global Const $RGB_RED90            = 0xE60000
    Global Const $RGB_RED80            = 0xCC0000
    Global Const $RGB_RED70            = 0xB30000
    Global Const $RGB_RED60            = 0x990000
    Global Const $RGB_RED50            = 0x800000
    Global Const $RGB_RED40            = 0x660000
    Global Const $RGB_RED30            = 0x4D0000
    Global Const $RGB_RED20            = 0x330000
    Global Const $RGB_RED10            = 0x1A0000

    Global Const $RGB_YELLOW           = 0xFFFF00
    Global Const $RGB_YELLOW90         = 0xE6E600
    Global Const $RGB_YELLOW80         = 0xCCCC00
    Global Const $RGB_YELLOW70         = 0xB3B300
    Global Const $RGB_YELLOW60         = 0x999900
    Global Const $RGB_YELLOW50         = 0x808000
    Global Const $RGB_YELLOW40         = 0x666600
    Global Const $RGB_YELLOW30         = 0x4D4D00
    Global Const $RGB_YELLOW20         = 0x333300
    Global Const $RGB_YELLOW10         = 0x1A1A00

    Global Const $RGB_GREEN            = 0x00FF00
    Global Const $RGB_GREEN90          = 0x00E600
    Global Const $RGB_GREEN80          = 0x00CC00
    Global Const $RGB_GREEN70          = 0x00B300
    Global Const $RGB_GREEN60          = 0x009900
    Global Const $RGB_GREEN50          = 0x008000
    Global Const $RGB_GREEN40          = 0x006600
    Global Const $RGB_GREEN30          = 0x004D00
    Global Const $RGB_GREEN20          = 0x003300
    Global Const $RGB_GREEN10          = 0x001A00

    Global Const $RGB_CYAN             = 0x00FFFF
    Global Const $RGB_CYAN90           = 0x00E6E6
    Global Const $RGB_CYAN80           = 0x00CCCC
    Global Const $RGB_CYAN70           = 0x00B3B3
    Global Const $RGB_CYAN60           = 0x009999
    Global Const $RGB_CYAN50           = 0x008080
    Global Const $RGB_CYAN40           = 0x006666
    Global Const $RGB_CYAN30           = 0x004D4D
    Global Const $RGB_CYAN20           = 0x003333
    Global Const $RGB_CYAN10           = 0x001A1A

    Global Const $RGB_BLUE             = 0x0000FF
    Global Const $RGB_BLUE90           = 0x0000E6
    Global Const $RGB_BLUE80           = 0x0000CC
    Global Const $RGB_BLUE70           = 0x0000B3
    Global Const $RGB_BLUE60           = 0x000099
    Global Const $RGB_BLUE50           = 0x000080
    Global Const $RGB_BLUE40           = 0x000066
    Global Const $RGB_BLUE30           = 0x00004D
    Global Const $RGB_BLUE20           = 0x000033
    Global Const $RGB_BLUE10           = 0x00001A

    Global Const $RGB_MAGENTA          = 0xFF00FF
    Global Const $RGB_MAGENTA90        = 0xE600E6
    Global Const $RGB_MAGENTA80        = 0xCC00CC
    Global Const $RGB_MAGENTA70        = 0xB300B3
    Global Const $RGB_MAGENTA60        = 0x990099
    Global Const $RGB_MAGENTA50        = 0x800080
    Global Const $RGB_MAGENTA40        = 0x660066
    Global Const $RGB_MAGENTA30        = 0x4D004D
    Global Const $RGB_MAGENTA20        = 0x330033
    Global Const $RGB_MAGENTA10        = 0x1A001A
#EndRegion

#Region Color palette with other color names
;Shade of yellow
    Global Const $COL_DARKGOLDENROD        = 0xB8860B
    Global Const $COL_ORANGE               = 0xFFA500
    Global Const $COL_GOLD                 = 0xFFD700
    Global Const $COL_GRAPEFRUIT           = 0xFFE21B
    Global Const $COL_CANARYYELLOW         = 0xFFF345
    Global Const $COL_BANANEA              = 0xFFD948
    Global Const $COL_AVOCADO              = 0xE8CF77

;Shade of red
    Global Const $COL_MAROON               = 0x800000
    Global Const $COL_ROSEATE              = 0xC7020B
    Global Const $COL_CRIMSON              = 0xEA2213
    Global Const $COL_TOMATO               = 0xEF3701
    Global Const $COL_ORANGERED            = 0xFF4500
    Global Const $COL_FIREBRICK            = 0xF2531A
    Global Const $COL_COPPER               = 0xDE5334
    Global Const $COL_CORAL                = 0xFF7F50

;Shade of brown
    Global Const $COL_RUST                 = 0x88450D
    Global Const $COL_CHOCOLATE            = 0xD2691E

;Shade of green
    Global Const $COL_OLIVE1               = 0x808000
    Global Const $COL_OLIVE2               = 0x6B8E23
    Global Const $COL_DARKKHAKI            = 0xBDB76B
    Global Const $COL_FORESTGREEN          = 0x228B22
    Global Const $COL_GREENYELLOW1         = 0x9ACD38
    Global Const $COL_GREENYELLOW2         = 0xADFF2F

;Shade of turquoise
    Global Const $COL_GREENTURQUOISE       = 0x00FF7F
    Global Const $COL_MEDIUMGREENTURQUOISE = 0x00FA9A
    Global Const $COL_DEEPSKYBLUE          = 0x00BFFF
    Global Const $COL_TURQUOISE            = 0x40E0D0
    Global Const $COL_SKYBLUE              = 0x87CEEB
    Global Const $COL_COPPERROOFGREEN      = 0x9CE4DB
    Global Const $COL_MEDIUMAQUAMARINE     = 0x66CDAA
    Global Const $COL_MEDIUMSEAGREEN       = 0x3CB371
    Global Const $COL_LIGHTSEAGREEN        = 0x20B2AA
    Global Const $COL_MEDIUMTURQUOISE      = 0x48D1CC
    Global Const $COL_AQUAMARINE           = 0x7FFFD4

;Shade of blue
    Global Const $COL_ROYALBLUE            = 0x4169E1
    Global Const $COL_STEELBLUE            = 0x4682B4
    Global Const $COL_CORNFLOWERBLUE       = 0x6495ED

;Shade of violet
    Global Const $COL_AUBERGINE            = 0x5D233E
    Global Const $COL_INDIGO               = 0x4B0082
    Global Const $COL_PURPLE               = 0x800080
    Global Const $COL_DUNKELVIOLET         = 0x9400D3
    Global Const $COL_DARKORCHID           = 0x9932CC
    Global Const $COL_MEDIUMSLATEBLUE      = 0x7B68EE
    Global Const $COL_MEDIUMVIOLET         = 0x9370DB
    Global Const $COL_PLUM                 = 0xDDA0DD
    Global Const $COL_THISTLE              = 0xD8BFD8
    Global Const $COL_DEEPPINK             = 0xFF1493
    Global Const $COL_MEDIUMVIOLETRED      = 0xC71585
    Global Const $COL_MEDIUMORCHID         = 0xBA55D3
    Global Const $COL_PASTELLVIOLETRED     = 0xDB7093
    Global Const $COL_ORCHID               = 0xDA70D6
    Global Const $COL_VIOLET               = 0xEE82EE
    Global Const $COL_PINK                 = 0xFFC0CB

;Shade of white and black
    Global Const $COL_ANTHRACITE           = 0x191C1F
    Global Const $COL_COAL                 = 0x232A30
    Global Const $COL_SLATEGRAY            = 0x708090
    Global Const $COL_SILVER               = 0xC0C0C0
    Global Const $COL_LAVENDER             = 0xE6E6FA
    Global Const $COL_WHEAT                = 0xF5DEB3
    Global Const $COL_ALMOND               = 0xFFEBCD
    Global Const $COL_BEIGE                = 0xF5F5DC
    Global Const $COL_SEASHELL             = 0xFFF5EE
    Global Const $COL_WHITESMOKE           = 0xF5F5F5
    Global Const $COL_SNOW                 = 0xFFFAFA

;Light
    Global Const $COL_LIGHTCORAL           = 0xF08080
    Global Const $COL_LIGHTSALMON          = 0xFFA07A
    Global Const $COL_LIGHTPINK            = 0xFFB6C1
    Global Const $COL_LIGHTGREEN           = 0x90EE90
    Global Const $COL_LIGHTSKYBLUE         = 0x87CEFA
    Global Const $COL_LIGHTSTEELBLUE       = 0xB0C4DE
    Global Const $COL_LIGHTBLUE            = 0xADD8E6
    Global Const $COL_LIGHTCYAN            = 0xE0FFFF

;Pale
    Global Const $COL_PALEGOLDENROD        = 0xEEE8AA
    Global Const $COL_PALEGREENTURQUOISE   = 0x98FB98
    Global Const $COL_PALETURQUOISE        = 0xAFEEEE
    Global Const $COL_PALEMINT             = 0xF5FFFA

;Shade of skin color
    Global Const $COL_SKINCOLOR1           = 0x380000
    Global Const $COL_SKINCOLOR2           = 0x440000
    Global Const $COL_SKINCOLOR3           = 0x5B0000
    Global Const $COL_SKINCOLOR4           = 0x720000
    Global Const $COL_SKINCOLOR5           = 0x710200
    Global Const $COL_SKINCOLOR6           = 0x7B0000
    Global Const $COL_SKINCOLOR7           = 0x880400
    Global Const $COL_SKINCOLOR8           = 0x940A00
    Global Const $COL_SKINCOLOR9           = 0xA01900
    Global Const $COL_SKINCOLOR10          = 0xA53900
    Global Const $COL_SKINCOLOR11          = 0xBB6D4A
    Global Const $COL_SKINCOLOR12          = 0xBE723C
    Global Const $COL_SKINCOLOR13          = 0xCC8443
    Global Const $COL_SKINCOLOR14          = 0xC77A58
    Global Const $COL_SKINCOLOR15          = 0xBD9778
    Global Const $COL_SKINCOLOR16          = 0xD0926E
    Global Const $COL_SKINCOLOR17          = 0xD99164
    Global Const $COL_SKINCOLOR18          = 0xE3A173
    Global Const $COL_SKINCOLOR19          = 0xDFA675
    Global Const $COL_SKINCOLOR20          = 0xE0B184
    Global Const $COL_SKINCOLOR21          = 0xE2B98F
    Global Const $COL_SKINCOLOR22          = 0xE4B98E
    Global Const $COL_SKINCOLOR23          = 0xDFB997
    Global Const $COL_SKINCOLOR24          = 0xE3C2AE
    Global Const $COL_SKINCOLOR25          = 0xEABD9D
    Global Const $COL_SKINCOLOR26          = 0xE5C298
    Global Const $COL_SKINCOLOR27          = 0xEECFB4
    Global Const $COL_SKINCOLOR28          = 0xEFD6BD
    Global Const $COL_SKINCOLOR29          = 0xFFDCB1
    Global Const $COL_SKINCOLOR30          = 0xFFDEAD
    Global Const $COL_SKINCOLOR31          = 0xFFE4B5
    Global Const $COL_SKINCOLOR32          = 0xFFE0C4
    Global Const $COL_SKINCOLOR33          = 0xEDE4C8
    Global Const $COL_SKINCOLOR34          = 0xFFEFD5

;Windows
    Global Const $COL_WIN7_CLIENTAREA      = 0xF0F0F0 ;Window background color of the client area at Win7
    Global Const $COL_WINXP_CLIENTAREA     = 0xECE9D8 ;Window background color of the client area at Win XP
#EndRegion
; ===============================================================================================================================

And with this tool, you can display the color palettes in a colorful list view and copy the constant name or the hex code to the clipboard.

; #INDEX# =======================================================================================================================
; Title .........: Display ColorConstantsEx
; AutoIt Version : 3.3
; Language ......: English
; Author ........: BugFix (www.autoit.de) - ursprünglicher Skriptname: HEX_Color_List.au3
; Modifiziert ...: Deep Thought (www.autoit.de)
; Datum .........: 26.8.2011
; ===============================================================================================================================
#include<EditConstants.au3>
#include<Misc.au3>
#include<GuiListView.au3>
#include<Array.au3>
#include<ButtonConstants.au3>
#include<GUIConstantsEx.au3>
#include<StaticConstants.au3>
#include<WindowsConstants.au3>
#include<Math.au3>

Opt("GUIOnEventMode", 1)

Dim $Colors_Maximal =2000
Dim $ind, $col, $hex, $strCopy
Dim $PaleGreen = 0x98FB98, $Navy = 0x000080


;GUI
    $Form1 = GUICreate("", 540, 688, -1, -1)
    GUISetOnEvent($GUI_EVENT_CLOSE, "AForm1Close")
    GUISetOnEvent($GUI_EVENT_SECONDARYDOWN, "SpecialEvents")

        ;Radiobox
        GUICtrlCreateGroup(" Sort by ", 0, 0, 345, 38)
            $rName = GUICtrlCreateRadio("Row Order", 30, 15, 120)
            GUICtrlSetState(-1, $GUI_CHECKED)
            GUICtrlSetOnEvent(-1, "rZeilenClick")

            $rSatt = GUICtrlCreateRadio("Name", 150, 15, 100)
            GUICtrlSetOnEvent(-1, "rNameClick")

            $rHell = GUICtrlCreateRadio("Brightness", 250, 15, 80)
            GUICtrlSetOnEvent(-1, "rHellClick")
        GUICtrlCreateGroup ("",-99,-99,1,1)

        ;Buttons
        $bOpen = GUICtrlCreateButton('Palette', 352, 12, 55, 20)
        GUICtrlSetOnEvent(-1, 'btPalette')
        $bPimpette = GUICtrlCreateButton('Pipette', 412, 12, 65, 20)
        GUICtrlSetOnEvent(-1, 'btSnapColorClick')
        $bMixer = GUICtrlCreateButton('Mixer', 482, 12, 55, 20)
        GUICtrlSetOnEvent(-1, 'ShowMixer')

        ;Listview
        $ListView1 = GUICtrlCreateListView("Color|Name|HEX-Code|RGB", 0, 40, 540, 647,$LVS_NOSORTHEADER)
            _GUICtrlListView_SetColumnWidth(-1, 0, 60)
            _GUICtrlListView_SetColumnWidth(-1, 1, 216)
            _GUICtrlListView_SetColumnWidth(-1, 2, 120)
            _GUICtrlListView_SetColumnWidth(-1, 3, 120)
            $hListView = GUICtrlGetHandle($ListView1)

;2. GUI
    $GUICopy = GUICreate("GUI Copy", 220, 115, -1, -1, BitOR($WS_MINIMIZEBOX,$WS_SIZEBOX, _
    $WS_THICKFRAME,$WS_GROUP,$WS_CLIPSIBLINGS,$WS_POPUP))
    GUISetBkColor(0xFFFFF0, $GUICopy)

    $lbShowColor = GUICtrlCreateLabel("", 10, 10, 200, 30, BitOR($SS_CENTER,$WS_BORDER))

    $bCopyTo = GUICtrlCreateButton("Name to Clipboard", 10, 53, 200, 22, $BS_DEFPUSHBUTTON)
    GUICtrlSetOnEvent(-1, "bNameCopyToClick")

    $bEscCopyTo = GUICtrlCreateButton("Hex-Code to Clipboard", 10, 82, 200, 22, 0)
    GUICtrlSetOnEvent(-1, "bHexCopyToClick")
    GUISetState(@SW_HIDE, $GUICopy)

;Cursor
    $Cursor = GUICreate('', 48, 48, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
    WinSetTrans($Cursor, '', 10)
    GUISetCursor(3, 1, $Cursor)


;Path ColorConstantsEx.au3
    $Path_ColorConstantsEx = IniRead(@ScriptDir&"\Display ColorConstantsEx","Path","Key1","")
    If $Path_ColorConstantsEx="" Or Not FileExists($Path_ColorConstantsEx) Then
        $Path_ColorConstantsEx = FileOpenDialog("Search for ColorConstants - color palette",@DesktopDir,"(ColorConstants*.au3)",1)
        If @error Then Exit
        IniWrite(@ScriptDir&"\Display ColorConstantsEx","Path","Key1",$Path_ColorConstantsEx)
    EndIf

Global $arItem[$Colors_Maximal]
Global $arColors[$Colors_Maximal][5]    ; 0=Name, 1=Hex, 2=Sort-Index Saturation, 3=Sort-Index Brightness, 4= If 1 => Font=white
ReadFile()


    GUISetState(@SW_SHOW, $Form1)
    _SetData(2)

;MAIN
    While 1
        Sleep(100)
        _GUICtrlListView_SetItemSelected ($ListView1,Number(_GUICtrlListView_GetSelectedIndices($ListView1)),False)
    WEnd


;==============
;   Function
;==============
Func btPalette()
    $Path_ColorConstantsEx = FileOpenDialog("Search for ColorConstants - color palette",$Path_ColorConstantsEx,"(ColorConstants*.au3)",1)
    If @error Then Return
    IniWrite(@ScriptDir&"\Display ColorConstantsEx","Path","Key1",$Path_ColorConstantsEx)
    ReadFile()
    _GUICtrlListView_DeleteAllItems($hListView)
    _SetData(2)
EndFunc

Func ReadFile()
    ;ColorConstantsEx.au3 lesen und interpretieren
    Global $arItem[$Colors_Maximal]
    Global $arColors[$Colors_Maximal][5]    ; 0=Name, 1=Hex, 2=Sort-Index Saturation, 3=Sort-Index Brightness, 4= If 1 => Font=white

    $File = FileOpen($Path_ColorConstantsEx)
        Global $Zeile = 0

        While 1
            $String = FileReadLine($File)
            If (@error = -1) Or ($Zeile=$Colors_Maximal) Then ExitLoop

            $InStr = StringInStr($String,"Global Const $")
            If $InStr>0 Then
                $len = StringInStr(StringTrimLeft($String,$InStr+12)," ")
                If $len = 0 Then $len = 1000
                $len1 = StringInStr(StringTrimLeft($String,$InStr+12),@TAB)
                If $len1 = 0 Then $len1 = 1000
                $len2 = StringInStr(StringTrimLeft($String,$InStr+12),"=")
                $arColors[$Zeile][0] = StringMid($String,$InStr+12,_Min(_Min($len,$len1),$len2))
                $arColors[$Zeile][1] = StringMid($String,StringInStr($String,"0x"),8)
                $arColors[$Zeile][2] = $Zeile
                $arColors[$Zeile][3] = Number("0x"&StringMid($arColors[$Zeile][1],3,2)) + Number("0x"&StringMid($arColors[$Zeile][1],5,2)) + Number("0x"&StringMid($arColors[$Zeile][1],7,2))
                If  $arColors[$Zeile][3] < 384 Then $arColors[$Zeile][4] = 1
                $Zeile += 1
            EndIf
        WEnd
        ReDim $arItem[$Zeile], $arColors[$Zeile][5]
    FileClose($File)
    WinSetTitle($Form1,"",StringTrimLeft($Path_ColorConstantsEx,StringInStr($Path_ColorConstantsEx,"\",0,-1))&" - color palette   ("&$Zeile&" colors)")
EndFunc


Func AForm1Close()
    Exit
EndFunc

Func rNameClick()
    _GUICtrlListView_DeleteAllItems($hListView)
    _SetData(0)
EndFunc

Func rZeilenClick()
    _GUICtrlListView_DeleteAllItems($hListView)
    _SetData(2)
EndFunc

Func rHellClick()
    _GUICtrlListView_DeleteAllItems($hListView)
    _SetData(3)
EndFunc

Func _SetData($SortIndx)
    _ArraySort($arColors, 0, 0, 0, $SortIndx)
    _GUICtrlListView_BeginUpdate($ListView1)
    For $i = 0 To UBound($arColors)-1
        $r = Dec(StringMid(Hex($arColors[$i][1],6), 1, 2))
        $g = Dec(StringMid(Hex($arColors[$i][1],6), 3, 2))
        $b = Dec(StringRight(Hex($arColors[$i][1],6), 2))
        $arItem[$i] = GUICtrlCreateListViewItem( "|" &$arColors[$i][0] & "|0x" & Hex($arColors[$i][1],6) & "| "&$r&"-"&$g&"-"&$b, $ListView1)
        If $arColors[$i][4] = 1 Then GUICtrlSetColor(-1, 0xFFFFFF)
        GUICtrlSetBkColor(-1,$arColors[$i][1])
    Next
    _GUICtrlListView_EndUpdate($ListView1)
EndFunc

Func SpecialEvents()
    If @GUI_CTRLID = $GUI_EVENT_SECONDARYDOWN Then
        If ControlGetFocus($Form1, "HEX-Code Color Table") = "SysListView321" Then
            $ind = _GUICtrlListView_GetSelectedIndices($hListView)
            $col = _GUICtrlListView_GetItemText($hListView, $ind, 1)
            $hex = _GUICtrlListView_GetItemText($hListView, $ind, 2)
            If $arColors[$ind][4] = 1 Then
                GUISetBkColor($PaleGreen, $GUICopy)
                GUICtrlSetColor($lbShowColor, 0xFFFFFF)
            Else
                GUISetBkColor($Navy, $GUICopy)
                GUICtrlSetColor($lbShowColor, 0x000000)
            EndIf
            GUICtrlSetBkColor($lbShowColor, $arColors[$ind][1])
            GUICtrlSetData($lbShowColor, $arColors[$ind][0])
            GUISetState(@SW_SHOW, $GUICopy)
        EndIf
    EndIf
EndFunc

Func bNameCopyToClick()
    $strCopy = $col
    ClipPut($strCopy)
    GUISetState(@SW_HIDE, $GUICopy)
    _ToolTipMouseExit(@TAB & $strCopy & @CRLF & "copied to Clipboard", -1, @DesktopWidth/2, @DesktopHeight/2, "Clipboard", 1, 1)
    GUISetState(@SW_RESTORE,$Form1)
EndFunc

Func bHexCopyToClick()
    $strCopy = $hex
    ClipPut($strCopy)
    GUISetState(@SW_HIDE, $GUICopy)
    _ToolTipMouseExit(@TAB & $strCopy & @CRLF & "copied to Clipboard", -1, @DesktopWidth/2, @DesktopHeight/2, "Clipboard", 1, 1)
    GUISetState(@SW_RESTORE,$Form1)
EndFunc

Func _ToolTipMouseExit($TEXT, $TIME=-1, $x=-1, $y=-1, $TITLE='', $ICON=0, $OPT='')
    If $TIME = -1 Then $TIME = 4000
    Local $start = TimerInit(), $pos0 = MouseGetPos()
    If ($x = -1) Or ($y = -1) Then
        ToolTip($TEXT, $pos0[0], $pos0[1], $TITLE, $ICON, $OPT)
    Else
        ToolTip($TEXT, $x, $y, $TITLE, $ICON, $OPT)
    EndIf
    Do
        Sleep(50)
        $pos = MouseGetPos()
    Until (TimerDiff($start) > $TIME) Or _
        (Abs($pos[0] - $pos0[0]) > 10 Or _
         Abs($pos[1] - $pos0[1]) > 10)
    ToolTip('')
EndFunc ;_ToolTipMouseExit

; Farb-Mixer
Func ShowMixer()
    $RGB="0x"&StringTrimLeft(_ChooseColor(2,0,0,$Form1),2)
    If $RGB = "0x" Then Return
    ClipPut($RGB)
    MsgBox(262144,"copied to Clipboard","               "&$RGB&"               ",4)
EndFunc

Func btSnapColorClick()
    GUISetState(@SW_HIDE, $Form1)
    GUISetState(@SW_SHOW, $Cursor)
    Local $pos
    Do
        $pos = MouseGetPos()
        WinMove($Cursor, '', $pos[0]-24, $pos[1]-24)
        Sleep(10)
    Until _IsPressed('01')
    GUISetState(@SW_HIDE, $Cursor)
    Local $col = "0x"&Hex(PixelGetColor($pos[0], $pos[1]),6)
    GUISetState(@SW_SHOW, $Form1)
    ClipPut($col)
    MsgBox(262144,"copied to Clipboard","               "&$col&"               ",4)
    WinActivate($Form1)
EndFunc

Share this post


Link to post
Share on other sites

Remarkable, especially for a first post.

Thanks for sharing,

Valuater

8)

EDIT: Suggestion

The ColorConstantsEx.au3 should be utilized the same as ColorConstants.au3 as an include rather than a external file.

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Ah yes! Good work! I have often battled with colours and never seem to

get the right shade I want.

Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...