Here is some old code that I had:
Function RGB_Split
Lparameters lnColor
#DEFINE RGB_RED 256^0
#DEFINE RGB_GREEN 256^1
#DEFINE RGB_BLUE 256^2
Local lnRed, lnGreen, lnBlue
Store 0 To lnRed, lnGreen, lnBlue
lnBlue = Int(lnColor / RGB_BLUE)
lnColor = lnColor - (lnBlue * RGB_BLUE)
lnGreen = Int(lnColor / RGB_GREEN)
lnColor = lnColor - (lnGreen * RGB_GREEN)
lnRed = lnColor
? " R=" + Alltrim(Str(lnRed,3,0)) + " G=" + Alltrim(Str(lnGreen,3,0)) + " B=" + Alltrim(Str(lnBlue,3,0))
Return ("")
*-EOC-*
>Hi Guys!
>
>Id like to know if thier is a way to obtain the three values of Red, Green and Blue for any given color.
>
>For example:
>
>lnColorNumber = rgb(25,110,205)
>
>loColors = MagicFunction(lnColorNumber)
>
>?loColors.Red
>?loColors.Blue
>?loColors.Green
>
>
>Thanks in advance guys !!
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only