#2D166B#2D166B

#2D166B is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.5% C 0.136 H 287.2°. Best body text is #FFFFFF at 14.60:1 contrast (WCAG AA passes).

Color values

HEX#2D166B
RGBrgb(45, 22, 107)
HSLhsl(256, 66%, 25%)
HSVhsv(256, 79%, 42%)
CMYKcmyk(57.9%, 79.4%, 0%, 58%)
CIE-LABlab(16.47, 34.28, -45.25)
CIE-LCHlch(16.47, 56.77, 307.15°)
OKLaboklab(29.52% 0.0402 -0.1302)
OKLCHoklch(29.52% 0.136 287.2)
XYZxyz(4.0221, 2.1930, 14.1184)
Luminance0.0219 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D166B #546B16
analogous
#162A6B #2D166B #57166B
triadic
#2D166B #6B2D16 #166B2D
tetradic
#2D166B #6B162A #546B16 #166B57
square
#2D166B #6B162A #546B16 #166B57
split-complementary
#2D166B #6B5716 #2A6B16
monochromatic
#0B0519 #180C38 #2D166B #42209E #582BD1

Accessibility & contrast

On white

14.60
#2D166B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D166B
14.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D166B#FFFFFF#000000##FFFFFF
##2D166B1.0014.601.4414.60
#FFFFFF14.601.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6D
Deuteranopia (green-blind)
#002669
Tritanopia (blue-blind)
#122E3F
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2d166b;
/* rgb */ color: rgb(45, 22, 107);
/* oklch */ color: oklch(29.5% 0.136 287.2);
Tailwind
colors: {
  custom: {
    50: '#6e5696',
    500: '#2d166b',
    950: '#000000',
  },
}
SCSS
$custom: #2d166b;
$custom-light: #6e5696;
$custom-dark: #000000;
JSON
{
  "hex": "#2d166b",
  "rgb": {
    "r": 45,
    "g": 22,
    "b": 107
  },
  "hsl": {
    "h": 256.235,
    "s": 65.891,
    "l": 25.294
  },
  "oklch": {
    "l": 0.29524,
    "c": 0.13627,
    "h": 287.2
  },
  "luminance": 0.02193
}

Semantic roles & 50–950 ramp

primary
#2D166B
secondary
#86A13B
accent
#E93FBB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #2D166B

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

Preview Lab → · Contrast checker → · Palette generator →

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