View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Convert RGB to Red/Green/Blue component

Here is one more method...

Dim Red As Long
Dim Green As Long
Dim Blue As Long
Dim HexVal As String

HexVal = Hex(rgbValue)
Red = CLng("&H" & Right(HexVal, 2))
Green = CLng("&H" & Mid(HexVal, 3, 2))
Blue = CLng("&H" & Left(HexVal, 2))

Debug.Print Red, Green, Blue

--
Rick (MVP - Excel)


"Barb Reinhardt" wrote in message
...
I've seen this somewhere, but can't find it now. Can someone direct me to
the formulas to convert to R/G/B components.

Thanks,
Barb Reinhardt