#2D187F#2D187F

#2D187F is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.159 H 281.9°. Best body text is #FFFFFF at 13.56:1 contrast (WCAG AA passes).

Color values

HEX#2D187F
RGBrgb(45, 24, 127)
HSLhsl(252, 68%, 30%)
HSVhsv(252, 81%, 50%)
CMYKcmyk(64.6%, 81.1%, 0%, 50.2%)
CIE-LABlab(18.98, 39.48, -53.99)
CIE-LCHlch(18.98, 66.89, 306.18°)
OKLaboklab(31.93% 0.0327 -0.1558)
OKLCHoklch(31.93% 0.159 281.9)
XYZxyz(5.2384, 2.7431, 20.3280)
Luminance0.0274 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D187F #6A7F18
analogous
#18377F #2D187F #61187F
triadic
#2D187F #7F2D18 #187F2D
tetradic
#2D187F #7F1837 #6A7F18 #187F61
square
#2D187F #7F1837 #6A7F18 #187F61
split-complementary
#2D187F #7F6118 #377F18
monochromatic
#09051A #1B0E4C #2D187F #3F22B2 #5938D9

Accessibility & contrast

On white

13.56
#2D187F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#2D187F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D187F
13.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D187F#FFFFFF#000000##FFFFFF
##2D187F1.0013.561.5513.56
#FFFFFF13.561.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003182
Deuteranopia (green-blind)
#002A7D
Tritanopia (blue-blind)
#00374B
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2d187f;
/* rgb */ color: rgb(45, 24, 127);
/* oklch */ color: oklch(31.9% 0.159 281.9);
Tailwind
colors: {
  custom: {
    50: '#7258a5',
    500: '#2d187f',
    950: '#000000',
  },
}
SCSS
$custom: #2d187f;
$custom-light: #7258a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2d187f",
  "rgb": {
    "r": 45,
    "g": 24,
    "b": 127
  },
  "hsl": {
    "h": 252.233,
    "s": 68.212,
    "l": 29.608
  },
  "oklch": {
    "l": 0.31928,
    "c": 0.15916,
    "h": 281.9
  },
  "luminance": 0.02743
}

Semantic roles & 50–950 ramp

primary
#2D187F
secondary
#9CB33F
accent
#EB3DC8
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D187F

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

Preview Lab → · Contrast checker → · Palette generator →

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