#2D126F#2D126F

#2D126F is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.5% C 0.145 H 286.8°. Best body text is #FFFFFF at 14.71:1 contrast (WCAG AA passes).

Color values

HEX#2D126F
RGBrgb(45, 18, 111)
HSLhsl(257, 72%, 25%)
HSVhsv(257, 84%, 44%)
CMYKcmyk(59.5%, 83.8%, 0%, 56.5%)
CIE-LABlab(16.20, 37.53, -48.31)
CIE-LCHlch(16.20, 61.17, 307.84°)
OKLaboklab(29.46% 0.0419 -0.1391)
OKLCHoklch(29.46% 0.145 286.8)
XYZxyz(4.1669, 2.1380, 15.2289)
Luminance0.0214 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D126F #546F12
analogous
#12266F #2D126F #5B126F
triadic
#2D126F #6F2D12 #126F2D
tetradic
#2D126F #6F1226 #546F12 #126F5B
square
#2D126F #6F1226 #546F12 #126F5B
split-complementary
#2D126F #6F5B12 #266F12
monochromatic
#0B041A #18093A #2D126F #421BA4 #5823D8

Accessibility & contrast

On white

14.71
#2D126F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D126F
14.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D126F#FFFFFF#000000##FFFFFF
##2D126F1.0014.711.4314.71
#FFFFFF14.711.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A72
Deuteranopia (green-blind)
#00266D
Tritanopia (blue-blind)
#0D2E41
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2d126f;
/* rgb */ color: rgb(45, 18, 111);
/* oklch */ color: oklch(29.5% 0.145 286.8);
Tailwind
colors: {
  custom: {
    50: '#6f5499',
    500: '#2d126f',
    950: '#000000',
  },
}
SCSS
$custom: #2d126f;
$custom-light: #6f5499;
$custom-dark: #000000;
JSON
{
  "hex": "#2d126f",
  "rgb": {
    "r": 45,
    "g": 18,
    "b": 111
  },
  "hsl": {
    "h": 257.419,
    "s": 72.093,
    "l": 25.294
  },
  "oklch": {
    "l": 0.29462,
    "c": 0.14528,
    "h": 286.8
  },
  "luminance": 0.02138
}

Semantic roles & 50–950 ramp

primary
#2D126F
secondary
#86A637
accent
#EF39BA
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2D126F

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

Preview Lab → · Contrast checker → · Palette generator →

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