AW: Convert rgb to lightness or darkness
Tiemo Hollmann TB
toolbook at kestner.de
Wed Oct 8 04:21:37 EDT 2014
Just a guess, didn't tried it.
If you add the three RGB values of the mousecolor, white (light) would be
765 and black (dark) 0. Somewhere around 382 you can switch from black to
yellow text.
Tiemo
> -----Ursprüngliche Nachricht-----
> Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im
Auftrag
> von William Prothero
> Gesendet: Dienstag, 7. Oktober 2014 21:59
> An: Use-livecode Use-livecode
> Betreff: Convert rgb to lightness or darkness
>
> Folks:
> Im putting text on an image that will be turned into a snapshot. The
image
> goes from light to dark. The text is a one or two digit integer. I want it
to
> show up on the image. For dark parts of the image, I set it to yellow, but
for
> light parts of the image, I want to set it to black. Is there a simple
formula
> for changing an rgb value into a darkness value that will let me choose
> between yellow or black text? I dont want to just set the ink of the
text
> because sometimes I write the text over itself, which diminishes the
effect.
>
> Thanks,
> Bill
>
> William A. Prothero
> http://es.earthednet.org/
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list