HEX to RGB: #2F4F4F

Also known as: CSS darkslategray, CSS darkslategrey

Result

#2F4F4F → rgb(47 79 79)

Values are shown at full precision, so converting back gives exactly #2f4f4f. 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. HEX → pairs

    #2F4F4F → 2F | 4F | 4F
  2. 2. base 16 → base 10

    R = 2F₁₆ = 2×16 + 15 = 47
    G = 4F₁₆ = 4×16 + 15 = 79
    B = 4F₁₆ = 4×16 + 15 = 79
  3. 3. RGB

    rgb(47 79 79)

All formats

HEX
#2f4f4f
RGB
rgb(47 79 79)
RGB (legacy)
rgb(47, 79, 79)
HSL
hsl(180.00 25.40% 24.71%) → hsl(180 25% 25%)
HWB
hwb(180 18% 69%)
OKLCH
oklch(0.403 0.038 195.8) · oklch(40.3% 0.038 195.8)
OKLab
oklab(0.403 -0.036 -0.010)
Lab (D50)
lab(31.14 -12.26 -3.94)
LCH (D50)
lch(31.14 12.88 197.80)
Display P3
color(display-p3 0.2129 0.3066 0.3081)
Linear sRGB
color(srgb-linear 0.0284 0.0782 0.0782)

Gamut: sRGB and Display P3

#2F4F4F is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.069 and Display P3 reaches 0.092; this color uses 55% of the sRGB chroma available.

CSS snippets

.element {
  color: #2f4f4f;
  color: rgb(47 79 79);
  color: hsl(180 25% 25%);
  color: oklch(0.403 0.038 195.8);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.403 0.038 195.8);
}
/* arbitrary values */
class="text-[#2f4f4f] bg-[oklch(0.403_0.038_195.8)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2129 0.3066 0.3081); }
}

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

  • #3F6060 · oklch(0.463 0.038 195.8) · ΔL +0.06
  • #1F3F3F · oklch(0.343 0.038 195.8) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?