Complementary RGB Color Pairs
Stephen Barncard
stephenREVOLUTION at barncard.com
Sun Feb 25 01:47:14 EST 2007
I know there's a simple formula for this, but my brain hurts tonight.
I would like to calculate the complementary color from an inputted color trio.
For instance I know that these two sets of two colors are complementary.
0,128,128
128,0,0
255,0,0
0,255,255
represented in binary, they look like this
00000000,10000000,10000000
10000000,00000000,00000000
11111111,00000000,00000000
00000000,11111111,11111111
YELLOW and GREEN look like this
255,255,0
0,0,255
11111111,11111111,00000000 yellow
00000000,00000000,11111111 green
some of these look like simple inversion but I don't think it's quite
that simple.
I'm sure someone has worked this out...
thanks
sqb
--
stephen barncard
s a n f r a n c i s c o
- - - - - - - - - - - -
More information about the use-livecode
mailing list