Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Random color generation anyone?
Message
 
 
To
08/12/2004 10:31:13
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00967748
Message ID:
00967764
Views:
30
This message has been marked as the solution to the initial question of the thread.
Hi Scott,

Take a look at Re: Get Hue/Sat/Lum Thread #523566 Message #523592. I think a Luminance value is what you're looking for.

>
>I have an appointment application that uses a third party ActiveX control to display schedules. The control is database challenged, that is, it is NOT bound to data in anyway nor can it be bound to data. This is very good because it gives the developer more control.
>
>What I'd like to do is to create a random color code generator. The ActiveX control is written in VB, so it expects all color codes in numeric format, like: 16777215 (white). I need this color generator to first randomly generate a backcolor, then, based on whether the back color is light or dark, set the forecolor to one of two colors (white or navy blue).
>
>I've looked at the color codes and don't see any rhyme or reason to the numbers being either light or dark colors. That is, numbers above 8388607 are light and below are dark. Doesn't seem to be any kind of logic to the numbers?
>
>Anyway...has anyone ever did anything like this?
>
>Thanks!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform