RGB to HEX: #6495ED

Also known as: CSS cornflowerblue

Result

rgb(100 149 237) → #6495ED

Values are shown at full precision, so converting back gives exactly #6495ed. The rounded form is what you normally paste into CSS.

Step-by-step math

Every number below is computed from the input, nothing is looked up.

  1. 1. base 10 → base 16

    R = 100 = 6×16 + 4 → 64
    G = 149 = 9×16 + 5 → 95
    B = 237 = 14×16 + 13 → ED
  2. 2. pairs → HEX

    64 95 ED → #6495ED

All formats

HEX
#6495ed
RGB
rgb(100 149 237)
RGB (legacy)
rgb(100, 149, 237)
HSL
hsl(218.54 79.19% 66.08%) → hsl(219 79% 66%)
HWB
hwb(219 39% 7%)
OKLCH
oklch(0.675 0.141 261.3) · oklch(67.5% 0.141 261.3)
OKLab
oklab(0.675 -0.021 -0.140)
Lab (D50)
lab(61.23 3.05 -50.19)
LCH (D50)
lch(61.23 50.28 273.47)
Display P3
color(display-p3 0.4343 0.5792 0.9038)
Linear sRGB
color(srgb-linear 0.1274 0.3005 0.8469)

Gamut: sRGB and Display P3

#6495ED is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.172 and Display P3 reaches 0.186; this color uses 82% of the sRGB chroma available.

CSS snippets

.element {
  color: #6495ed;
  color: rgb(100 149 237);
  color: hsl(219 79% 66%);
  color: oklch(0.675 0.141 261.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.675 0.141 261.3);
}
/* arbitrary values */
class="text-[#6495ed] bg-[oklch(0.675_0.141_261.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4343 0.5792 0.9038); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #6495ed calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #76A8FF · oklch(0.735 0.141 261.3) · ΔL +0.06
  • #5382D9 · oklch(0.615 0.141 261.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?