What is RGB?
RGB is the additive color model screens use: every color is mixed from red, green and blue light, each from 0 to 255. A value looks like rgb(59, 130, 246), and rgba() adds transparency.
RGB and HEX are the same color
A HEX code is just RGB written in base-16: #3B82F6 is exactly rgb(59, 130, 246). Use RGB when your code manipulates channels or needs rgba() transparency; use HEX for compact CSS. Pick a color above to copy either.
Frequently asked questions
- What is the RGB value of a color?
- Three numbers from 0 to 255 giving the intensity of the red, green and blue channels. For example pure red is rgb(255, 0, 0).
- How do I convert RGB to HEX?
- Pick a color or type an rgb() value into the picker and Color Picker Lab shows the matching HEX code instantly — they are the same red/green/blue values in different number systems.
- How do I add transparency to an RGB color?
- Use rgba() with a fourth value — the alpha — from 0 (transparent) to 1 (opaque). Drag the alpha slider in the picker and copy the rgba() value.