#2D1158#2D1158

#2D1158 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 26.9% C 0.118 H 295.2°. Best body text is #FFFFFF at 15.76:1 contrast (WCAG AA passes).

Color values

HEX#2D1158
RGBrgb(45, 17, 88)
HSLhsl(264, 68%, 21%)
HSVhsv(264, 81%, 35%)
CMYKcmyk(48.9%, 80.7%, 0%, 65.5%)
CIE-LABlab(13.61, 31.14, -37.31)
CIE-LCHlch(13.61, 48.60, 309.85°)
OKLaboklab(26.93% 0.0502 -0.1069)
OKLCHoklch(26.93% 0.118 295.2)
XYZxyz(3.0436, 1.6633, 9.3913)
Luminance0.0166 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D1158 #3C5811
analogous
#111858 #2D1158 #501158
triadic
#2D1158 #582D11 #11582D
tetradic
#2D1158 #581118 #3C5811 #115850
square
#2D1158 #581118 #3C5811 #115850
split-complementary
#2D1158 #585011 #185811
monochromatic
#0D051A #130725 #2D1158 #471B8B #6125BF

Accessibility & contrast

On white

15.76
#2D1158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.33
#2D1158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D1158
15.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D1158#FFFFFF#000000##FFFFFF
##2D11581.0015.761.3315.76
#FFFFFF15.761.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00235A
Deuteranopia (green-blind)
#002257
Tritanopia (blue-blind)
#212433
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #2d1158;
/* rgb */ color: rgb(45, 17, 88);
/* oklch */ color: oklch(26.9% 0.118 295.2);
Tailwind
colors: {
  custom: {
    50: '#6b5288',
    500: '#2d1158',
    950: '#000000',
  },
}
SCSS
$custom: #2d1158;
$custom-light: #6b5288;
$custom-dark: #000000;
JSON
{
  "hex": "#2d1158",
  "rgb": {
    "r": 45,
    "g": 17,
    "b": 88
  },
  "hsl": {
    "h": 263.662,
    "s": 67.619,
    "l": 20.588
  },
  "oklch": {
    "l": 0.26927,
    "c": 0.11813,
    "h": 295.2
  },
  "luminance": 0.01663
}

Semantic roles & 50–950 ramp

primary
#2D1158
secondary
#6C9134
accent
#EA3DA6
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#07020B
muted
#7A787C

Preview Lab

Preview with #2D1158

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

Preview Lab → · Contrast checker → · Palette generator →

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