How to use the RGB Color Picker
- Drag in the color square or type rgb(30, 144, 255).
- Fine-tune each channel with the R, G and B sliders.
- Click the RGB or RGBA value to copy it.
RGB Color Picker features
- R, G and B sliders from 0 to 255, plus an opacity slider for RGBA
- Accepts rgb(), rgba() and the modern rgb(r g b / a) syntax
- Live HEX, HSL, HSV, CMYK and OKLCH equivalents
- Screen eyedropper to read the RGB value of anything on screen (Chrome, Edge, Opera)
- Harmonies, tints, shades and contrast checks
- Saved colors kept in your browser
What is RGB color?
RGB stands for red, green and blue, the three colors of light that every screen is built from. Each pixel on your phone, laptop or TV has tiny red, green and blue elements, and by changing how bright each one is, the screen can show millions of colors. An RGB color code simply lists those three brightness values.
In the usual 8-bit form each channel runs from 0 (off) to 255 (full brightness). rgb(255, 0, 0) is pure red, rgb(0, 0, 0) is black because every light is off, and rgb(255, 255, 255) is white because every light is fully on. That gives 256 × 256 × 256 = 16,777,216 combinations.
How RGB mixing works
RGB is an additive model: you start with darkness and add light. That makes it behave differently from mixing paint, where adding more pigment makes colors darker.
| Mix | RGB value | Result |
|---|---|---|
| Red + green | rgb(255, 255, 0) | Yellow |
| Green + blue | rgb(0, 255, 255) | Cyan |
| Red + blue | rgb(255, 0, 255) | Magenta |
| All three, equal | rgb(128, 128, 128) | Gray |
| All three, full | rgb(255, 255, 255) | White |
When the three values are equal you always get a neutral gray, and the higher they are, the lighter the gray. Raising one channel above the others tints the color toward it.
RGB vs RGBA
RGBA adds a fourth value, alpha, which controls opacity from 0 (fully transparent) to 1 (fully opaque). rgba(30, 144, 255, 0.5) is a half-transparent blue that lets the background show through. Modern CSS also accepts a space-separated form with a slash, which works in every current browser:
color: rgb(30 144 255);
background: rgb(30 144 255 / 50%);
Use the opacity slider in the picker and copy the RGBA value to get the transparent version of any color.
Where RGB codes are used
- CSS and HTML:
rgb()andrgba()work anywhere a color is accepted. - JavaScript and canvas: pixel data from a canvas is read as red, green, blue and alpha values from 0 to 255.
- Games and 3D: Unity, Unreal and shaders often use RGB with each channel from 0 to 1. Divide by 255 to convert, or copy the ready-made code from the Color Converter.
- LED strips and smart bulbs: most controllers and home automation apps take RGB values.
- Video and photo apps: Premiere, DaVinci Resolve, Photoshop and GIMP all show RGB values in their color pickers.
RGB, HEX and HSL compared
RGB and hex codes contain exactly the same information. rgb(30, 144, 255) and #1E90FF are the same color, written in decimal and hexadecimal. RGB is easier to read and to change in code, while hex is shorter to paste. When you want to make a color lighter, darker or less saturated by hand, HSL is usually easier; see the HSL Color Picker.
Tips for choosing RGB values
- Pure channel values such as
rgb(255, 0, 0)look harsh on screen. Pulling the highest channel slightly below 255 and lifting the others above 0 gives softer, more natural colors. - To darken a color evenly, multiply all three channels by the same factor. For better results, use the Shades & Tints Generator.
- To find the RGB value of a color in a photo or screenshot, click it in the Image Color Picker, or inspect individual pixels with the Pixel Inspector.
RGB Color Picker: frequently asked questions
What is the difference between RGB and RGBA?
RGBA adds a fourth value, alpha, for opacity. In modern CSS you can also write rgb(30 144 255 / 50%).
How many colors can RGB represent?
With 256 levels per channel, 8-bit RGB can represent 16,777,216 colors.
How do I convert RGB to hex?
Convert each channel to a two-digit hexadecimal number: rgb(30, 144, 255) becomes 1E, 90 and FF, so #1E90FF. Type the RGB value into the picker and copy the HEX value.
What is the RGB value of white and black?
White is rgb(255, 255, 255) and black is rgb(0, 0, 0). Equal values in all three channels always give a shade of gray.
Why does mixing red and green give yellow?
Screens mix light, not paint. Adding red and green light stimulates the same cells in your eyes as yellow light, so rgb(255, 255, 0) looks yellow.
How do I convert RGB from 0–255 to 0–1?
Divide each channel by 255. rgb(30, 144, 255) becomes (0.118, 0.565, 1.0), the form used by Unity, shaders and many 3D tools.