#2D1271#2D1271

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

Color values

HEX#2D1271
RGBrgb(45, 18, 113)
HSLhsl(257, 73%, 26%)
HSVhsv(257, 84%, 44%)
CMYKcmyk(60.2%, 84.1%, 0%, 55.7%)
CIE-LABlab(16.42, 38.13, -49.24)
CIE-LCHlch(16.42, 62.28, 307.75°)
OKLaboklab(29.68% 0.0412 -0.1418)
OKLCHoklch(29.68% 0.148 286.2)
XYZxyz(4.2782, 2.1825, 15.8154)
Luminance0.0218 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D1271 #567112
analogous
#122671 #2D1271 #5C1271
triadic
#2D1271 #712D12 #12712D
tetradic
#2D1271 #711226 #567112 #12715C
square
#2D1271 #711226 #567112 #12715C
split-complementary
#2D1271 #715C12 #267112
monochromatic
#0B041A #180A3C #2D1271 #421AA6 #5723DB

Accessibility & contrast

On white

14.62
#2D1271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D1271
14.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D1271#FFFFFF#000000##FFFFFF
##2D12711.0014.621.4414.62
#FFFFFF14.621.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.621.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2d1271;
/* rgb */ color: rgb(45, 18, 113);
/* oklch */ color: oklch(29.7% 0.148 286.2);
Tailwind
colors: {
  custom: {
    50: '#70549b',
    500: '#2d1271',
    950: '#000000',
  },
}
SCSS
$custom: #2d1271;
$custom-light: #70549b;
$custom-dark: #000000;
JSON
{
  "hex": "#2d1271",
  "rgb": {
    "r": 45,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 257.053,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.29682,
    "c": 0.1477,
    "h": 286.2
  },
  "luminance": 0.02183
}

Semantic roles & 50–950 ramp

primary
#2D1271
secondary
#88A837
accent
#EF39BB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2D1271

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

Preview Lab → · Contrast checker → · Palette generator →

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