Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine when to use black or white as label forecolor
Message
 
 
To
12/06/2005 22:32:15
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01022663
Message ID:
01022668
Views:
16
Malcolm,

Pull the color value apart into it's RGB components using RGBColor() from foxtools and then you can pick some generalized level between 0 and 255 that you want to use as the swap over point.

>Any tips on how to analyze a background's RGB() color and determine whether the background color is dark enough to use a transparent label with white (light) forecolor or whether the background color is light enough to use a transparent label with a black (dark) forecolor?
>
>Goal: I would like to automatically determine the most readable forecolor based on a user's choice of a background color.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform