#2F176A#2F176A

#2F176A is a dark, vivid violet. Relative luminance 0.023; OKLCH L 29.8% C 0.134 H 288.7°. Best body text is #FFFFFF at 14.47:1 contrast (WCAG AA passes).

Color values

HEX#2F176A
RGBrgb(47, 23, 106)
HSLhsl(257, 64%, 25%)
HSVhsv(257, 78%, 42%)
CMYKcmyk(55.7%, 78.3%, 0%, 58.4%)
CIE-LABlab(16.78, 33.75, -44.07)
CIE-LCHlch(16.78, 55.51, 307.45°)
OKLaboklab(29.77% 0.0429 -0.1267)
OKLCHoklch(29.77% 0.134 288.7)
XYZxyz(4.0794, 2.2575, 13.8537)
Luminance0.0226 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F176A #526A17
analogous
#17296A #2F176A #58176A
triadic
#2F176A #6A2F17 #176A2F
tetradic
#2F176A #6A1729 #526A17 #176A58
square
#2F176A #6A1729 #526A17 #176A58
split-complementary
#2F176A #6A5817 #296A17
monochromatic
#0B0519 #190C38 #2F176A #45229C #5C2DCF

Accessibility & contrast

On white

14.47
#2F176A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#2F176A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F176A
14.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F176A#FFFFFF#000000##FFFFFF
##2F176A1.0014.471.4514.47
#FFFFFF14.471.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6C
Deuteranopia (green-blind)
#002768
Tritanopia (blue-blind)
#182E3F
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2f176a;
/* rgb */ color: rgb(47, 23, 106);
/* oklch */ color: oklch(29.8% 0.134 288.7);
Tailwind
colors: {
  custom: {
    50: '#6f5795',
    500: '#2f176a',
    950: '#000000',
  },
}
SCSS
$custom: #2f176a;
$custom-light: #6f5795;
$custom-dark: #000000;
JSON
{
  "hex": "#2f176a",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 106
  },
  "hsl": {
    "h": 257.349,
    "s": 64.341,
    "l": 25.294
  },
  "oklch": {
    "l": 0.29768,
    "c": 0.13376,
    "h": 288.7
  },
  "luminance": 0.02258
}

Semantic roles & 50–950 ramp

primary
#2F176A
secondary
#83A03D
accent
#E740B7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #2F176A

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#2F176A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva