Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Random color generation anyone?
Message
De
08/12/2004 10:31:13
Scott Malinowski
Arizona Fox Software LLC
Arizona, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Random color generation anyone?
Divers
Thread ID:
00967748
Message ID:
00967748
Vues:
111
Greetings!

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!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform