#2D1171#2D1171

#2D1171 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.6% C 0.149 H 286.4°. Best body text is #FFFFFF at 14.68:1 contrast (WCAG AA passes).

Color values

HEX#2D1171
RGBrgb(45, 17, 113)
HSLhsl(258, 74%, 25%)
HSVhsv(258, 85%, 44%)
CMYKcmyk(60.2%, 85%, 0%, 55.7%)
CIE-LABlab(16.26, 38.59, -49.50)
CIE-LCHlch(16.26, 62.77, 307.94°)
OKLaboklab(29.57% 0.0419 -0.1426)
OKLCHoklch(29.57% 0.149 286.4)
XYZxyz(4.2624, 2.1508, 15.8101)
Luminance0.0215 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D1171 #557111
analogous
#112571 #2D1171 #5D1171
triadic
#2D1171 #712D11 #11712D
tetradic
#2D1171 #711125 #557111 #11715D
square
#2D1171 #711125 #557111 #11715D
split-complementary
#2D1171 #715D11 #257111
monochromatic
#0B041B #18093C #2D1171 #4219A6 #5721DB

Accessibility & contrast

On white

14.68
#2D1171 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#2D1171 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D1171
14.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D1171#FFFFFF#000000##FFFFFF
##2D11711.0014.681.4314.68
#FFFFFF14.681.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00266F
Tritanopia (blue-blind)
#0A2E42
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2d1171;
/* rgb */ color: rgb(45, 17, 113);
/* oklch */ color: oklch(29.6% 0.149 286.4);
Tailwind
colors: {
  custom: {
    50: '#70549b',
    500: '#2d1171',
    950: '#000000',
  },
}
SCSS
$custom: #2d1171;
$custom-light: #70549b;
$custom-dark: #000000;
JSON
{
  "hex": "#2d1171",
  "rgb": {
    "r": 45,
    "g": 17,
    "b": 113
  },
  "hsl": {
    "h": 257.5,
    "s": 73.846,
    "l": 25.49
  },
  "oklch": {
    "l": 0.29573,
    "c": 0.14859,
    "h": 286.4
  },
  "luminance": 0.02151
}

Semantic roles & 50–950 ramp

primary
#2D1171
secondary
#87A836
accent
#F137BA
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2D1171

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

Preview Lab → · Contrast checker → · Palette generator →

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