HomeDevRGB Color Codes Chart
Color tools

RGB Color Codes Chart

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…

Loading Preparing tool…

How to use

Follow these steps for a clear answer.

1

Set RGB channels

Drag the Red, Green, and Blue sliders (0–255), or type values and HEX directly.

2

Pick from the chart

Click the color chart to jump to a nearby hue and lightness, then fine-tune with the sliders.

3

Copy RGB or HEX

Copy rgb(), HEX, HSL, or the packed decimal code into CSS and HTML.

Color formulas

Core relationships used by this color tool.

CSS RGBrgb(R, G, B)
HEX#RRGGBB
24-bit decimalR×65536 + G×256 + B
Channel rangeR, G, B ∈ [0, 255]
i0 turns a channel off; 255 is full on. Equal R=G=B values produce grays. HEX pairs are the same channels written in base-16.

Example colors

Common picks with formula and result.

ϟ

Pure red

Only red channel

rgb(255, 0, 0)
#FF0000 · 16711680
ϟ

Lime green

Only green channel

rgb(0, 255, 0)
#00FF00 · 65280
ϟ

Blue

Only blue channel

rgb(0, 0, 255)
#0000FF · 255
ϟ

Neutral gray

Equal channels

rgb(128, 128, 128)
#808080 · 8421504

RGB color codes specification

Version 1.0.0

Definition
The RGB color model builds every on-screen color from Red, Green, and Blue light. Each channel is 8 bits (0–255), so there are 256³ = 16,777,216 possible colors. Screens mix these channels additively—full intensity of all three is white.
What it calculates
Live HEX, rgb(), HSL, and 24-bit decimal values for any R/G/B selection, with optional CSS named-color match.
Inputs
  • Red, Green, Blue integers 0–255
  • Optional HEX string
  • Optional pick from the hue/lightness chart
Outputs
  • HEX (#RRGGBB)
  • rgb(R, G, B)
  • hsl(H, S%, L%)
  • Packed decimal R×65536+G×256+B
  • CSS keyword when the RGB matches a named color
Formula
HEX ↔ RGB; decimal = R×65536 + G×256 + B; HSL derived from RGB

On 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>
Basic RGB colors
ColorCSS nameHEXRGB
Blackblack#0000000, 0, 0
Whitewhite#FFFFFF255, 255, 255
Redred#FF0000255, 0, 0
Limelime#00FF000, 255, 0
Blueblue#0000FF0, 0, 255
Yellowyellow#FFFF00255, 255, 0
Cyan / Aquacyan#00FFFF0, 255, 255
Magenta / Fuchsiamagenta#FF00FF255, 0, 255
Silversilver#C0C0C0192, 192, 192
Graygray#808080128, 128, 128
Maroonmaroon#800000128, 0, 0
Oliveolive#808000128, 128, 0
Greengreen#0080000, 128, 0
Purplepurple#800080128, 0, 128
Tealteal#0080800, 128, 128
Navynavy#0000800, 0, 128
i Packed decimal = R×65536 + G×256 + B. Example: blue = 255.
Assumptions
  • Opaque sRGB for web use.
  • Conversions run locally in the browser.
  • Chart picks use full saturation HSL, then map to RGB for the sliders.
Units
  • RGB channels: 0–255
  • HEX: #RRGGBB
  • Decimal: 0–16777215
Boundary conditions
  • Channel inputs are clamped to 0–255.
  • Invalid HEX is ignored until a valid 3- or 6-digit code is entered.
Example
rgb(47, 128, 237) → #2F80ED → 3113197
Validation cases
  • rgb(255, 0, 0) → #FF0000 · 16711680
  • rgb(0, 0, 255) → #0000FF · 255
  • rgb(128, 128, 128) → #808080
  • rgb(0, 128, 128) → #008080 (teal)
Sources
  • sRGB / CSS Color Module RGB notation
  • 24-bit packed RGB integer identity
Calculation version
1.0.0

Frequently asked questions

Key distinctions behind the tool.

What is an RGB color code?

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.

How do I convert RGB to HEX?

Write each channel as two hexadecimal digits (00–FF) and join them: R=255 → FF, G=0 → 00, B=0 → 00 → #FF0000.

What is the 24-bit decimal RGB value?

A single integer packing the channels: R×65536 + G×256 + B. White is 16777215; black is 0.

What is the difference between rgb() and rgba()?

rgb() is opaque. rgba() adds an alpha channel (0–1 or 0%–100%) for transparency.

How many RGB colors are there?

With 8 bits per channel: 256×256×256 = 16,777,216 colors.