chazzmani 0 Posted September 10, 2007 Here is small script I wrote to show you a problem I am having. If you will look at the code, it sets a color variable using a HEX color (0xDF816B). Easy enough. However, when I run the script and have the color code shown in the GUI, the color code is something I don't recognize (14647659). It doesn't look like an RGB code to me. Can someone shed any light? What color system is this new number coming from? Is it possible to show the HEX color within the box? Thanks in advance! CODE#include <GUIConstants.au3> #include <Misc.au3> #include <File.au3> $BurntOrange = 0xDF816B $GUI = GUICreate("", 200, 100, 5, 5) GUICtrlCreateLabel("Color:", 10, 54, 85, 17) $ColorDisplay = GUICtrlCreateLabel("", 95, 53, 76, 19, BitOR($SS_CENTER, $SS_SUNKEN)) GUICtrlSetBkColor($ColorDisplay, $BurntOrange) GUICtrlSetColor($ColorDisplay, 0x00ff00) GUICtrlSetFont ($ColorDisplay,9, 700) GUICtrlSetData($ColorDisplay, $BurntOrange);<========= show color code in box GUICtrlSetState(-1, $GUI_FOCUS) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect Wend Share this post Link to post Share on other sites
Toady 3 Posted September 10, 2007 Change that line you specified to GUICtrlSetData($ColorDisplay, "0x" & Hex($BurntOrange,6));<========= show color code in box That number your getting is an integer representation of the hex value... both same thing. www.itoady.comA* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Share this post Link to post Share on other sites
Monamo 4 Posted September 10, 2007 Change that line you specified to GUICtrlSetData($ColorDisplay, "0x" & Hex($BurntOrange,6));<========= show color code in box - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Share this post Link to post Share on other sites
chazzmani 0 Posted September 10, 2007 Change that line you specified to GUICtrlSetData($ColorDisplay, "0x" & Hex($BurntOrange,6));<========= show color code in box That number your getting is an integer representation of the hex value... both same thing. Perfect, that worked. Thank you Share this post Link to post Share on other sites