Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding contrasting colors
Message
From
23/10/2002 17:26:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Finding contrasting colors
Miscellaneous
Thread ID:
00714574
Message ID:
00714574
Views:
46
Hello
I have a grid where the backcolor is set at runtime using the dynamicbackcolor property

I need to make the text readable no matter the back color. I tried setting dynamicforecolor to bitxor(dynamicbackcolor, rgb(255,255,255)), but the results are disgusting

I want to set dynamicforecolor to black if the back color is light and to white if the back color is dark. But I cannot find a function that reliably tells me the "intensity" or "luminance" of the color...

Thanks!
Next
Reply
Map
View

Click here to load this message in the networking platform