Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RGB(r,g,b) == x
Message
De
27/11/2001 08:33:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00586236
Message ID:
00586239
Vues:
14
>Greetings my friends. :)
>
>One more of those tiny easy questions:
>
>?RGB(150,120,0) returns 30870. No problem.
>
>But, how can I get the RGB components from 30870?

30870 = 0*256^2 + 120*256+150.

To do the calculations the other way around, use a combination of the modulos operator (%) and int().

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform