Set RGB channels
Drag the Red, Green, and Blue sliders (0–255), or type values and HEX directly.
Use the free RGB Color Codes Chart on CalculatorX for fast local results. Clear formulas, assumptions, and worked examples on the page. Try it free.
Loading tool…
Follow these steps for a clear answer.
Drag the Red, Green, and Blue sliders (0–255), or type values and HEX directly.
Click the color chart to jump to a nearby hue and lightness, then fine-tune with the sliders.
Copy rgb(), HEX, HSL, or the packed decimal code into CSS and HTML.
Core relationships used by this color tool.
Common picks with formula and result.
Only red channel
Only green channel
Only blue channel
Equal channels
Version 1.0.0
HEX ↔ RGB; decimal = R×65536 + G×256 + B; HSL derived from RGBOn an LED/LCD display, each pixel combines red, green, and blue emitters. Setting a channel to 0 turns that light off; 255 is full brightness. Mixing all three at 255 produces white (#FFFFFF); all zero is black.
For named CSS keywords and family browsing, see HTML color codes. For harmony palettes, use the color wheel.
.element {
color: rgb(255, 0, 0);
}
.overlay {
background-color: rgba(0, 0, 0, 0.5);
}
.gradient {
background: linear-gradient(to right, rgb(255, 0, 0), rgb(0, 0, 255));
}
<div style="background-color: rgb(0, 128, 128); color: rgb(255, 255, 255);">
Teal background
</div>
| Color | CSS name | HEX | RGB |
|---|---|---|---|
| Black | black | #000000 | 0, 0, 0 |
| White | white | #FFFFFF | 255, 255, 255 |
| Red | red | #FF0000 | 255, 0, 0 |
| Lime | lime | #00FF00 | 0, 255, 0 |
| Blue | blue | #0000FF | 0, 0, 255 |
| Yellow | yellow | #FFFF00 | 255, 255, 0 |
| Cyan / Aqua | cyan | #00FFFF | 0, 255, 255 |
| Magenta / Fuchsia | magenta | #FF00FF | 255, 0, 255 |
| Silver | silver | #C0C0C0 | 192, 192, 192 |
| Gray | gray | #808080 | 128, 128, 128 |
| Maroon | maroon | #800000 | 128, 0, 0 |
| Olive | olive | #808000 | 128, 128, 0 |
| Green | green | #008000 | 0, 128, 0 |
| Purple | purple | #800080 | 128, 0, 128 |
| Teal | teal | #008080 | 0, 128, 128 |
| Navy | navy | #000080 | 0, 0, 128 |
Key distinctions behind the tool.
An RGB code sets red, green, and blue intensities from 0 to 255. Example: rgb(255, 0, 0) is pure red. Displays mix the three lights to form the final color.
Write each channel as two hexadecimal digits (00–FF) and join them: R=255 → FF, G=0 → 00, B=0 → 00 → #FF0000.
A single integer packing the channels: R×65536 + G×256 + B. White is 16777215; black is 0.
rgb() is opaque. rgba() adds an alpha channel (0–1 or 0%–100%) for transparency.
With 8 bits per channel: 256×256×256 = 16,777,216 colors.