Getting RGB color from buttons on form

Hasson

Active Member
Joined
Apr 8, 2021
Messages
406
Office Version
  1. 2016
Platform
  1. Windows
Hi,
I would extract colors from RGB type for buttons on form using cells inside sheet.
seem HEX type in properties window when select button , but I have no idea how change from HEX to RGB
thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
The hex values look like this:

&H0080FFFF&

the two blue digits are the B values, the green are the G and the red are the R. You can actually use those values in the RGB function by prefixing them with &H (and remembering the correct order):

VBA Code:
rgb(&HFF, &HFF, &H80)
 
Upvote 0
how use that inside sheet?
I don't see any cells reference to show RGB !
 
Upvote 0
How/where are you trying to use it?
 
Upvote 0
here is back color for commandbutton1 &H8000000F&
so I would change to RGB
not really sure if I need cells to populate RGB or I don't need cells.
the most important I would show RGB to use with drawing program.
 
Upvote 0
Ah, I'd forgotten that is actually a system constant, not a real colour value (or it would be black) - it was designed so that userforms would use the colour schemes set up in windows. You could simply screenshot the form into a graphics program with a colour picker (e.g. Paint) and get the RGB values from there. The default for a button is RGB(240,240,240) or 15790320
 
Upvote 0
You could simply screenshot the form into a graphics program with a colour picker (e.g. Paint) and get the RGB values from there
when open picture from PAINT program and edit color will select normal color is black . it doesn't show original RGB color !
The default for a button is RGB(240,240,240) or 15790320
thanks but I would how find out by paint program as you said.
 
Upvote 0
Paint has a colour picker which you can use to get the colour at a particular point in the picture (circle #1) and then the colours palette (circle #2) will show you the current RGB values for the selected colour:
1733401396166.png
 
Upvote 0
Solution
It may also be that your drawing program has a colour picker that you can use directly.
 
Upvote 0
Paint has a colour picker which you can use to get the colour at a particular point in the picture (circle #1) and then the colours palette (circle #2) will show you the current RGB values for the selected colour:
perfect !
thank you.:)
It may also be that your drawing program has a colour picker that you can use directly.
I suspect available with my version .
 
Upvote 0

Forum statistics

Threads
1,225,502
Messages
6,185,350
Members
453,288
Latest member
rlmorales2000

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