Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding contrasting colors
Message
From
24/10/2002 08:11:38
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00714574
Message ID:
00714755
Views:
19
David
I tried it, but it does not give very good results with some combinations (some colors like orange, yellow). I had better results testing two colors at a time:

retcol = 16777215 && default white (rgb(255,255,255))
IF (red > 128 and green >128) OR (red > 128 and blue >128) OR (blue > 128 and green >128)
retcol = 0 && black
endif
RETURN retcol

Thanks!
Previous
Reply
Map
View

Click here to load this message in the networking platform