Complementary RGB Color Pairs

Stephen Barncard stephenREVOLUTION at barncard.com
Mon Feb 26 11:18:22 EST 2007


Thanks to all who responded.
I was turned onto a lot of information about color.

I guess the upshot is that a simple compliment - literally - will do 
what I wanted - subtracting 255 from each part of the color array. 
This is what I came up with:

FUNCTION complimentColor pTrio
          REPEAT for each item tITEM in pTrio
                   put abs(tITEM - 255) & comma after tOut
          END REPEAT
          delete last char of tOut
          return tOut
END complimentColor


Obviously there are many color reference systems out there that can 
provide great color combinations... especially the one at

http://wellstyled.com/tools/colorscheme2/index-en.html








>
>For those who do not want to bother to download a big stack just for 
>the matter of a few script lines
>here is the script of btn "complementary colors" that at least gives 
>you a hint how to proceed to find out
>complementary color triplets:
>
>"on mouseUp
>  set the cursor to watch
>  put the milliseconds into Start
>  put the imageData of image 2 into iData
>  put 0 into counter
>  repeat for each char C in idata
>    add 1 to counter
>    put numtochar(255 - chartonum(C)) into char counter of idata
>  end repeat
>  set the imageData of image 2 to iData
>  put the milliseconds - Start into fld "test"
>end mouseUp"
>
>Regards,
>
>Wilhelm Sanke

-- 


stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -





More information about the use-livecode mailing list