on May 22nd, 2016, 03:03am, michael wrote:
|you can use RGB values like 010200100 -which is 10,200,100 |
I wonder why you are using this decimal notation when hexadecimal RGB values are so much more common (your example colour would be 0AC864 in hex). The 'web' (specifically HTML) uses hexadecimal RGB values so you can't get much more standard than that!
Apart from the standardisation issue, conversion from hexadecimal is straightforward:
hex$ = "0AC864"
rgb% = EVAL("&"+hex$)
r& = rgb% >> 16
g& = rgb% >> 8
b& = rgb%
(here using byte variables to avoid explicitly AND-ing with &FF).