#2F1171#2F1171

#2F1171 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.8% C 0.148 H 287.8°. Best body text is #FFFFFF at 14.59:1 contrast (WCAG AA passes).

Color values

HEX#2F1171
RGBrgb(47, 17, 113)
HSLhsl(259, 74%, 25%)
HSVhsv(259, 85%, 44%)
CMYKcmyk(58.4%, 85%, 0%, 55.7%)
CIE-LABlab(16.49, 38.84, -49.11)
CIE-LCHlch(16.49, 62.61, 308.34°)
OKLaboklab(29.79% 0.0453 -0.1414)
OKLCHoklch(29.79% 0.148 287.8)
XYZxyz(4.3525, 2.1973, 15.8144)
Luminance0.0220 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1171 #537111
analogous
#112371 #2F1171 #5F1171
triadic
#2F1171 #712F11 #11712F
tetradic
#2F1171 #711123 #537111 #11715F
square
#2F1171 #711123 #537111 #11715F
split-complementary
#2F1171 #715F11 #237111
monochromatic
#0B041B #19093C #2F1171 #4519A6 #5B21DB

Accessibility & contrast

On white

14.59
#2F1171 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#2F1171 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1171
14.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1171#FFFFFF#000000##FFFFFF
##2F11711.0014.591.4414.59
#FFFFFF14.591.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00266F
Tritanopia (blue-blind)
#112E42
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2f1171;
/* rgb */ color: rgb(47, 17, 113);
/* oklch */ color: oklch(29.8% 0.148 287.8);
Tailwind
colors: {
  custom: {
    50: '#71549b',
    500: '#2f1171',
    950: '#000000',
  },
}
SCSS
$custom: #2f1171;
$custom-light: #71549b;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1171",
  "rgb": {
    "r": 47,
    "g": 17,
    "b": 113
  },
  "hsl": {
    "h": 258.75,
    "s": 73.846,
    "l": 25.49
  },
  "oklch": {
    "l": 0.29786,
    "c": 0.14845,
    "h": 287.8
  },
  "luminance": 0.02197
}

Semantic roles & 50–950 ramp

primary
#2F1171
secondary
#84A836
accent
#F137B7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2F1171

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

Preview Lab → · Contrast checker → · Palette generator →

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