RGB to HEX: #0C4A6E

Also known as: Tailwind v3 sky-900

Result

rgb(12 74 110) → #0C4A6E

Values are shown at full precision, so converting back gives exactly #0c4a6e. 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 = 12 = 0×16 + 12 → 0C
    G = 74 = 4×16 + 10 → 4A
    B = 110 = 6×16 + 14 → 6E
  2. 2. pairs → HEX

    0C 4A 6E → #0C4A6E

All formats

HEX
#0c4a6e
RGB
rgb(12 74 110)
RGB (legacy)
rgb(12, 74, 110)
HSL
hsl(202.04 80.33% 23.92%) → hsl(202 80% 24%)
HWB
hwb(202 5% 57%)
OKLCH
oklch(0.391 0.085 240.9) · oklch(39.1% 0.085 240.9)
OKLab
oklab(0.391 -0.041 -0.074)
Lab (D50)
lab(29.25 -8.24 -26.58)
LCH (D50)
lch(29.25 27.83 252.77)
Display P3
color(display-p3 0.1293 0.2856 0.4196)
Linear sRGB
color(srgb-linear 0.0037 0.0685 0.1559)

Gamut: sRGB and Display P3

#0C4A6E is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.091 and Display P3 reaches 0.119; this color uses 93% of the sRGB chroma available.

CSS snippets

.element {
  color: #0c4a6e;
  color: rgb(12 74 110);
  color: hsl(202 80% 24%);
  color: oklch(0.391 0.085 240.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.391 0.085 240.9);
}
/* arbitrary values */
class="text-[#0c4a6e] bg-[oklch(0.391_0.085_240.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1293 0.2856 0.4196); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #0c4a6e 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

  • #225B80 · oklch(0.451 0.085 240.9) · ΔL +0.06
  • #003A5C · oklch(0.331 0.085 240.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?