Get RGB from cell color.

  • Thread starter Thread starter Legacy 98055
  • Start date Start date
L

Legacy 98055

Guest
This came up with from a reply to:
http://216.92.17.166/board/viewtopic.php?topic=25527&forum=2&3
I usually do a screen capture to Paint Shop Pro to get the RGB, but thought it would be nice to have a function which would get the Red, Green, Blues's from a cell. I could settle for a chart. Have seen them on the net. But I would still like to have this function available if anyone has a clue on how to do it.
Thanks,
Will keep looking myself
Tom
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hello Tom, based on some of David McRitchie's fine handy work from:

http://216.239.33.100/search?q=cach...l/colors.htm+"mcritchie"+"rgb"&hl=en&ie=UTF-8

I played with the following with some success in xl2000:

<pre>
Function showRGB2(rcell)
Dim myStr As String
Application.Volatile
myStr = Right("000000" & Hex(rcell.Interior.Color), 6)
showRGB2 = Application.Evaluate("=Hex2dec(""" & Right(myStr, 2) & """)") & _
", " & Application.Evaluate("=Hex2dec(""" & Mid(myStr, 3, 2) & """)") & ", " _
& Application.Evaluate("=Hex2dec(""" & Left(myStr, 2) & """)")
End Function</pre>

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,707
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top