|
-
Feb 1st, 2000, 07:46 AM
#1
Thread Starter
Hyperactive Member
I need a function that will return the R, G, And B Values from a hexidecimal color. Is there a function to do this? If not could someone possibly share some code to do this? I would be wickid happy if you could.
Thanks
joey o
-
Feb 1st, 2000, 08:13 AM
#2
Email me.. I got a tool that you need.. 
------------------
John T. Mieske
Star Trek LCARS programmer
Knight Vision Enterprises
[email protected]
-
Feb 1st, 2000, 04:27 PM
#3
Fanatic Member
Public Function ColorCodeToRGB(lColorCode As Long, iRed As Integer, iGreen As Integer, iBlue As Integer) As Boolean
' 1996/01/16 Return the individual colors for lColorCode.
' 1996/07/15 Use Tip 171: Determining RGB Color Values, MSDN July 1996.
' Enter with:
' lColorCode contains the color to be converted
'
' Return:
' iRed contains the red component
' iGreen the green component
' iBlue the blue component
'
Dim lColor As Long
lColor = lColorCode 'work long
iRed = lColor Mod &H100 'get red component
lColor = lColor \ &H100 'divide
iGreen = lColor Mod &H100 'get green component
lColor = lColor \ &H100 'divide
iBlue = lColor Mod &H100 'get blue component
ColorCodeToRGB = True
End Function
-
Feb 2nd, 2000, 11:41 AM
#4
Thread Starter
Hyperactive Member
Thanks Paul282!
That's some really cool code. I'm very greatful.
Thanks Again
Joey o.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|