Date: 02-16-2022
Return to Index
created by gbSnippets
'RGB colors are 4 bytes, with components positioned like this:
0-B-G-R
'BGR colors are 4 bytes, with components positioned like this:
0-R-G-B
'To get the components from an RGB color number, use this:
R = iColor Mod 256
'or this: iColor AND &HFF&
G = (iColor\256) Mod 256
'or this: (iColor AND &HFF00&) \ &H100
B = (iColor\256\256) Mod 256
'or this: (iColor AND &HFF0000&) \ &H10000&
'gbs_00442
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm