RGB Color Picker

#2563EBrgb(37, 99, 235)

Adjust RGB Channels

015%255
039%255
092%255

Additive Channel Mix

37
99
235
Mix

Combined brightness: 48%

Color Codes

Hex

#2563EB

color: #2563EB;

RGB

rgb(37, 99, 235)

color: rgb(37, 99, 235);

HSL

hsl(221, 83%, 53%)

color: hsl(221, 83%, 53%);

CMYK

cmyk(84%, 58%, 0%, 8%)

/* CMYK: 84%, 58%, 0%, 8% */

Relative Luminance (WCAG)

0.1532

Dark color — use light text

CSS Snippets

color: #2563EB;
background: rgb(37, 99, 235);
border: 2px solid hsl(221, 83%, 53%);
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);

Quick Presets

Common RGB Values Reference

ColorRGBHex
Pure Red25500#FF0000\u2190 click
Pure Green01280#008000\u2190 click
Pure Blue00255#0000FF\u2190 click
Yellow2552550#FFFF00\u2190 click
Cyan0255255#00FFFF\u2190 click
Magenta2550255#FF00FF\u2190 click
White255255255#FFFFFF\u2190 click
Silver192192192#C0C0C0\u2190 click
Navy00128#000080\u2190 click
Maroon12800#800000\u2190 click

How to Use This Tool

  1. 1.Drag the Red, Green, and Blue sliders to mix your color \u2014 each slider ranges from 0 (none) to 255 (full intensity)
  2. 2.Or type exact values into the number fields next to each slider for precise control (e.g., Red: 37, Green: 99, Blue: 235)
  3. 3.Watch the live color preview update in real time as you adjust \u2014 the dark bar chart below the sliders shows how each channel contributes to the final mix
  4. 4.Copy the color in any format you need: click "Copy" next to the Hex, RGB, HSL, or CMYK output, or use the CSS snippet block at the bottom
  5. 5.Use the preset buttons or click any row in the reference table to jump to common colors instantly

Rate this tool

How RGB Color Mixing Works: Additive Light and the 0–255 Range

An RGB color picker mixes red, green, and blue light \u2014 and the results break every intuition you developed finger-painting as a kid. Set Red to 255 and Green to 255 with Blue at 0, and you don't get brown or olive. You get bright yellow. That one result trips up more people than any color theory textbook, and it reveals the fundamental difference between mixing light and mixing ink.

RGB color mixing diagram showing three overlapping circles of red, green, and blue light creating cyan, magenta, yellow at pairwise intersections and white at the center

Additive vs. Subtractive: Why RGB Isn't Paint

Your monitor doesn't have yellow pixels. It has red, green, and blue sub-pixels \u2014 nothing else. When you see yellow on screen, that's your red and green sub-pixels firing at high intensity while blue stays dark. Your retina's L-cones (sensitive to red, peaking at ~564 nm) and M-cones (sensitive to green, peaking at ~534 nm) both respond strongly, and your brain interprets that paired signal as yellow (~580 nm). There's no 580 nm light actually being emitted.

Paint works in reverse. Mix red and green pigment and you get a muddy brown because pigments subtract light. Red paint absorbs green and blue wavelengths. Green paint absorbs red and blue. Combine them and almost everything gets absorbed. That's subtractive mixing \u2014 the more you add, the darker it gets. The RGB to CMYK converter shows you exactly how a screen color maps into subtractive ink percentages, and the shift is often dramatic: vivid screen blues land at CMYK values that print noticeably duller.

The 0\u2013255 Range and Where It Comes From

Each RGB channel stores one byte: 8 bits, giving 28= 256 possible values from 0 to 255. That's not arbitrary. In the early 1980s, the IBM PC's VGA standard allocated 8 bits per channel, and the rest of computing followed. Three channels \u00d7 8 bits = 24-bit color = 16,777,216 possible combinations. That number \u2014 ~16.7 million \u2014 lands just above the human eye's ability to distinguish adjacent shades (estimated at 7-10 million discriminable colors under ideal conditions). More bits would be wasted storage for most use cases.

The boundary values matter most. 0 means no light from that channel. 255 means full intensity. RGB(0, 0, 0) is black \u2014 all sub-pixels off. RGB(255, 255, 255) is white \u2014 everything at max. Every shade of neutral gray sits on the diagonal line where R = G = B, from (1, 1, 1) to (254, 254, 254). That's 254 shades of gray, which is 204 more than a certain novel claimed.

Channel Math: Three Worked Examples

Example 1: Coral.Start with RGB(255, 127, 80). Red is maxed out. Green is at half (127/255 = 49.8%). Blue is at 31.4%. This creates a warm, salmon-like tone. In hex, that's #FF7F50. The conversion: 255 \u2192 FF, 127 \u2192 7F (7\u00d716 + 15 = 127), 80 \u2192 50 (5\u00d716 + 0 = 80).

Example 2: A medium gray.RGB(128, 128, 128) sits exactly at the midpoint of each channel. You'd expect this to look like 50% brightness, but on a standard monitor it actually appears brighter than true 50% gray because of gamma encoding. We'll cover that trap in a moment. The hex is #808080 \u2014 each pair being 80 in hex (8\u00d716 + 0 = 128).

Example 3: Constructing teal. Teal is equal parts green and blue with no red: RGB(0, 128, 128). Both the G and B channels at 50% produce a muted, dark cyan. Bump it to RGB(0, 255, 255) and you get full cyan \u2014 one of the three secondary colors in additive mixing. The hex to RGB converter can verify these breakdowns if you want to go the other direction.

When RGB Falls Short

RGB can address 16.7 million colors, but not every color that exists. The sRGB gamut \u2014 the color space web browsers use \u2014 covers only about 35% of the colors the human eye can perceive (the CIE 1931 visible gamut). Highly saturated cyans and greens are the biggest gaps; no sRGB value matches the vivid turquoise of a tropical ocean or the electric green of a highlighter pen.

Wider gamuts exist. Display P3 covers about 25% more than sRGB, and Rec. 2020 covers about 75% of visible colors. Apple devices default to Display P3, which is why that photo you shot on an iPhone can look subtly duller when opened in a standard sRGB browser window. CSS now supports color(display-p3 0.145 0.388 0.922)for wider gamut, but fallbacks are essential \u2014 older browsers will silently drop any color they don't understand, defaulting to inherited or black.

Color SpaceCoverage of CIE 1931Bits per ChannelTypical Use
sRGB~35%8Web, CSS, most monitors
Display P3~43%10Apple devices, HDR displays
Adobe RGB~50%16Photography, print proofing
Rec. 2020~75%10\u201312HDR video, 4K/8K broadcast

RGB Sliders vs. HSL Sliders: Which to Use When

Moving an RGB slider affects the final color in a non-intuitive way. Push the red slider from 100 to 200 and the color doesn't just "get more red" \u2014 it also shifts in hue, saturation, and perceived brightness simultaneously. That makes RGB sliders great for precision (you know exactly which byte you're changing) but awkward for exploration.

HSL (Hue, Saturation, Lightness) separates these concerns. Want a darker version of the same color? Drop the L value. Want a muted version? Drop the S value. The hue stays constant. That's why design systems like Tailwind generate their color scales in HSL: adjust one axis, keep the other two fixed. Our RGB to hex converter can help bridge the gap if you start with RGB values from a screenshot and need to derive an HSL-based palette.

Use RGB sliders when you have a specific numeric target (matching a brand spec, pasting values from an API response, tuning individual channel output for LED hardware). Use HSL when you're designing \u2014 exploring tints, shades, and tonal variations of a base color.

The Gamma Trap That Silently Shifts Your Colors

RGB(128, 128, 128) is the mathematical midpoint of each channel. But on your monitor, it doesn't look like 50% brightness. It looks closer to 22%. That's because monitors apply gamma correction \u2014 a nonlinear transfer function that maps stored values to physical light output. The standard sRGB gamma curve is approximately value2.2, which means a stored value of 128 (50% of 255) produces only (128/255)2.2 \u2248 21.8% of the maximum light intensity.

This matters when you try to average two colors. Naively averaging RGB(255, 0, 0) and RGB(0, 0, 255) gives RGB(128, 0, 128) \u2014 a purple. But because of gamma, that purple is darker than you'd expect. The physically accurate midpoint (in linear light space) would be around RGB(188, 0, 188) after gamma encoding. Any time you're blending, interpolating, or computing gradients in code, convert to linear RGB first, do the math, then convert back. CSS gradients handle this automatically since Chrome 111 and Firefox 120 added support for color-interpolation in linear sRGB.

Storing RGB Values in Production Code

Hardcoding rgb(37, 99, 235) across 47 files creates a maintenance nightmare. The industry-standard approach: define once, reference everywhere.

In CSS, use custom properties: :root { --brand-blue: 37, 99, 235; }. Then apply with rgba(var(--brand-blue), 0.5) for 50% opacity, or rgb(var(--brand-blue)) for full. This lets you adjust opacity per-use without duplicating the color.

In JavaScript/TypeScript, a color object is cleaner than a hex string when you need channel math. Store { r: 37, g: 99, b: 235 } and write conversion functions that accept this shape. Hex strings require parsing on every use, while an object gives you direct access to each channel for Canvas API calls like ctx.fillStyle or WebGL uniform buffers.

For design tokens shared between CSS, iOS, and Android, the W3C Design Tokens spec uses an 8-digit hex with alpha (#2563EBFF) or a structured JSON object. Either way, the single source of truth lives in one token file, and build tools generate platform-specific output. Never let the same RGB value exist in two places \u2014 divergence is inevitable.

Marko Sinko
Marko SinkoTechnical Tools Editor

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Marko builds and verifies the technical tools, number system converters, and scientific calculators across UnitCalcTools, ensuring mathematical precision and developer-friendly interfaces.

Last updated: April 13, 2026LinkedIn

Frequently Asked Questions

A strong orange is RGB(255, 165, 0), which is CSS named color "Orange." Darker burnt orange sits around RGB(204, 85, 0), while a lighter peach-orange is roughly RGB(255, 200, 100). The key is high red (200-255), moderate green (80-200), and very low or zero blue.
RGB is an additive color model — it mixes light, not paint. When red photons at 700 nm and green photons at 530 nm hit the same spot on your retina, your brain perceives yellow (~580 nm) because both the L and M cone cells fire strongly. Brown is what you get in subtractive mixing (paint/ink) because pigments absorb light rather than emit it.
White is RGB(255, 255, 255) — all three channels at maximum, meaning full red, green, and blue light combined. Black is RGB(0, 0, 0) — all channels at zero, no light emitted. Every shade of gray sits on the diagonal where R, G, and B share the same value, from RGB(50, 50, 50) dark gray to RGB(200, 200, 200) light gray.
Standard 8-bit RGB produces 256 × 256 × 256 = 16,777,216 unique colors. Each channel stores 8 bits (one byte), so a full color needs 24 bits total — that’s why it’s called "24-bit color" or "true color." Some displays support 10-bit per channel (over 1 billion colors), but CSS and most web images use 8-bit.
RGBA adds a fourth channel — alpha — that controls opacity. Alpha ranges from 0 (fully transparent) to 1 in CSS notation, or 0 to 255 in raw values. For example, rgba(37, 99, 235, 0.5) is 50% transparent blue. The color itself stays the same; alpha only affects how much of the background shows through.
On Windows, press Win+Shift+C with PowerToys installed to launch a screen-wide eyedropper that reports RGB values. On macOS, open the Digital Color Meter utility in Applications > Utilities. In Chrome or Firefox DevTools, inspect any element, click the small color swatch in the CSS panel, and the built-in picker shows RGB values. All methods report the rendered pixel color, which may differ from the CSS source if transparency or filters are applied.
Yes. The CSS rgb() function accepts three values from 0-255: rgb(37, 99, 235). Modern CSS (Colors Level 4) also accepts percentages: rgb(14.5%, 38.8%, 92.2%). For transparency, use rgba() or the modern syntax rgb(37 99 235 / 0.5). All current browsers support both formats.
The closest RGB approximation of Pantone 286 C is around RGB(0, 51, 160), or #0033A0 in hex. This is an approximation because Pantone is a spot-color system — it uses premixed inks that can produce colors outside the sRGB gamut. The actual printed Pantone 286 C appears more vivid than any monitor can reproduce, with an estimated delta-E of 3-5 from its nearest sRGB equivalent.

Related Tools