#2F1771#2F1771

#2F1771 is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.5% C 0.143 H 286.7°. Best body text is #FFFFFF at 14.17:1 contrast (WCAG AA passes).

Color values

HEX#2F1771
RGBrgb(47, 23, 113)
HSLhsl(256, 66%, 27%)
HSVhsv(256, 80%, 44%)
CMYKcmyk(58.4%, 79.6%, 0%, 55.7%)
CIE-LABlab(17.50, 35.92, -47.45)
CIE-LCHlch(17.50, 59.51, 307.13°)
OKLaboklab(30.49% 0.0409 -0.1366)
OKLCHoklch(30.49% 0.143 286.7)
XYZxyz(4.4584, 2.4091, 15.8497)
Luminance0.0241 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1771 #597117
analogous
#172C71 #2F1771 #5C1771
triadic
#2F1771 #712F17 #17712F
tetradic
#2F1771 #71172C #597117 #17715C
square
#2F1771 #71172C #597117 #17715C
split-complementary
#2F1771 #715C17 #2C7117
monochromatic
#0B0519 #1A0D3E #2F1771 #4421A4 #5A2ED4

Accessibility & contrast

On white

14.17
#2F1771 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#2F1771 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1771
14.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1771#FFFFFF#000000##FFFFFF
##2F17711.0014.171.4814.17
#FFFFFF14.171.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D74
Deuteranopia (green-blind)
#00286F
Tritanopia (blue-blind)
#113043
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2f1771;
/* rgb */ color: rgb(47, 23, 113);
/* oklch */ color: oklch(30.5% 0.143 286.7);
Tailwind
colors: {
  custom: {
    50: '#70579b',
    500: '#2f1771',
    950: '#000000',
  },
}
SCSS
$custom: #2f1771;
$custom-light: #70579b;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1771",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 113
  },
  "hsl": {
    "h": 256,
    "s": 66.176,
    "l": 26.667
  },
  "oklch": {
    "l": 0.3049,
    "c": 0.14257,
    "h": 286.7
  },
  "luminance": 0.02409
}

Semantic roles & 50–950 ramp

primary
#2F1771
secondary
#8BA73D
accent
#E93FBC
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2F1771

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

Preview Lab → · Contrast checker → · Palette generator →

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