RGB to HEX: #064E3B

Also known as: Tailwind v3 emerald-900

Result

rgb(6 78 59) → #064E3B

Values are shown at full precision, so converting back gives exactly #064e3b. 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 = 6 = 0×16 + 6 → 06
    G = 78 = 4×16 + 14 → 4E
    B = 59 = 3×16 + 11 → 3B
  2. 2. pairs → HEX

    06 4E 3B → #064E3B

All formats

HEX
#064e3b
RGB
rgb(6 78 59)
RGB (legacy)
rgb(6, 78, 59)
HSL
hsl(164.17 85.71% 16.47%) → hsl(164 86% 16%)
HWB
hwb(164 2% 69%)
OKLCH
oklch(0.378 0.073 168.9) · oklch(37.8% 0.073 168.9)
OKLab
oklab(0.378 -0.072 0.014)
Lab (D50)
lab(28.82 -25.46 5.17)
LCH (D50)
lch(28.82 25.98 168.51)
Display P3
color(display-p3 0.1285 0.3010 0.2358)
Linear sRGB
color(srgb-linear 0.0018 0.0762 0.0437)

Gamut: sRGB and Display P3

#064E3B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.076 and Display P3 reaches 0.103; this color uses 96% of the sRGB chroma available.

CSS snippets

.element {
  color: #064e3b;
  color: rgb(6 78 59);
  color: hsl(164 86% 16%);
  color: oklch(0.378 0.073 168.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.378 0.073 168.9);
}
/* arbitrary values */
class="text-[#064e3b] bg-[oklch(0.378_0.073_168.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1285 0.3010 0.2358); }
}

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

  • #1F5F4B · oklch(0.438 0.073 168.9) · ΔL +0.06
  • #003E2C · oklch(0.318 0.073 168.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?