Complementary RGB Color Pairs
Jim Ault
JimAultWins at yahoo.com
Sun Feb 25 02:05:36 EST 2007
On 2/24/07 10:47 PM, "Stephen Barncard" <stephenREVOLUTION at barncard.com>
wrote:
> 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.
This is not a direct answer to your question, but some examples of
outstanding color tools you might be able to use.
--Monte Goulding
http://www.sweattechnologies.com/rev/
libColor.rev
--Eric Chatonet -- using libColor
HSL ColorsHarmonized.rev
--card script --
on MakeColor pPos
local tNum
lock screen
put 0 into tNum
repeat with i = 1 to 18
set the backColor of fld i to libColor_Convert(tNum & comma & pPos &
",100","RGB","HSV")
add 20 to tNum
end repeat
unlock screen
end MakeColor
--the stack script is an impressive library of conversions, etc.
I can send you a copy of Eric's stack or you can get it from SoSmartSoftware
Jim Ault
Las Vegas
On 2/24/07 10:47 PM, "Stephen Barncard" <stephenREVOLUTION at barncard.com>
wrote:
> 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
More information about the use-livecode
mailing list