gear Posted February 7, 2007 Posted February 7, 2007 The setting for RGB color is strange, like 0x8080ff , how can I know what is the code for white color? Gear
Josbe Posted February 8, 2007 Posted February 8, 2007 'Googling' you can found many tools for get color's code, like this online tool and this chart.You can view that white color in HEX Format is: 0xFFFFFF, in RGB is 255,255,255.Additionally, some from my old library of functions, modify it as you need it:;// Converter: RGB To Hexadecimal format (parameters "Red, Green, Blue" (0-255) Func _RGB2HEX($_rgb) $rgbComp = StringSplit( StringStripWS($_rgb, 8), ',') Return Hex( BitAND($rgbComp[1], 255), 2) & Hex( BitAND($rgbComp[2], 255), 2) & Hex( BitAND($rgbComp[3], 255), 2) EndFunc ;// Converter: Hexadecimal To RGB format Func _HEX2RGB($_hex) Local $R = Dec(StringMid($_hex, 1, 2)) Local $G = Dec(StringMid($_hex, 3, 2)) Local $B = Dec(StringMid($_hex, 5, 2)) Return $R & ',' & $G & ',' & $B EndFunc AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now