#2D187E#2D187E

#2D187E is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.158 H 282.1°. Best body text is #FFFFFF at 13.60:1 contrast (WCAG AA passes).

Color values

HEX#2D187E
RGBrgb(45, 24, 126)
HSLhsl(252, 68%, 29%)
HSVhsv(252, 81%, 49%)
CMYKcmyk(64.3%, 81%, 0%, 50.6%)
CIE-LABlab(18.87, 39.17, -53.54)
CIE-LCHlch(18.87, 66.34, 306.19°)
OKLaboklab(31.82% 0.0331 -0.1544)
OKLCHoklch(31.82% 0.158 282.1)
XYZxyz(5.1735, 2.7171, 19.9865)
Luminance0.0272 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D187E #697E18
analogous
#18367E #2D187E #60187E
triadic
#2D187E #7E2D18 #187E2D
tetradic
#2D187E #7E1836 #697E18 #187E60
square
#2D187E #7E1836 #697E18 #187E60
split-complementary
#2D187E #7E6018 #367E18
monochromatic
#09051A #1B0E4B #2D187E #3F22B1 #5937D9

Accessibility & contrast

On white

13.60
#2D187E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#2D187E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D187E
13.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D187E#FFFFFF#000000##FFFFFF
##2D187E1.0013.601.5413.60
#FFFFFF13.601.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003181
Deuteranopia (green-blind)
#002A7C
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2d187e;
/* rgb */ color: rgb(45, 24, 126);
/* oklch */ color: oklch(31.8% 0.158 282.1);
Tailwind
colors: {
  custom: {
    50: '#7258a4',
    500: '#2d187e',
    950: '#000000',
  },
}
SCSS
$custom: #2d187e;
$custom-light: #7258a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2d187e",
  "rgb": {
    "r": 45,
    "g": 24,
    "b": 126
  },
  "hsl": {
    "h": 252.353,
    "s": 68,
    "l": 29.412
  },
  "oklch": {
    "l": 0.31818,
    "c": 0.15793,
    "h": 282.1
  },
  "luminance": 0.02718
}

Semantic roles & 50–950 ramp

primary
#2D187E
secondary
#9BB23F
accent
#EB3DC7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D187E

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

Preview Lab → · Contrast checker → · Palette generator →

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