#2D157E#2D157E

#2D157E is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.5% C 0.161 H 282.5°. Best body text is #FFFFFF at 13.81:1 contrast (WCAG AA passes).

Color values

HEX#2D157E
RGBrgb(45, 21, 126)
HSLhsl(254, 71%, 29%)
HSVhsv(254, 83%, 49%)
CMYKcmyk(64.3%, 83.3%, 0%, 50.6%)
CIE-LABlab(18.37, 40.65, -54.38)
CIE-LCHlch(18.37, 67.89, 306.78°)
OKLaboklab(31.47% 0.0349 -0.1568)
OKLCHoklch(31.47% 0.161 282.5)
XYZxyz(5.1151, 2.6002, 19.9670)
Luminance0.0260 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D157E #667E15
analogous
#15327E #2D157E #62157E
triadic
#2D157E #7E2D15 #157E2D
tetradic
#2D157E #7E1532 #667E15 #157E62
square
#2D157E #7E1532 #667E15 #157E62
split-complementary
#2D157E #7E6215 #327E15
monochromatic
#09041A #1A0C4A #2D157E #401EB2 #5831DD

Accessibility & contrast

On white

13.81
#2D157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2D157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D157E
13.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D157E#FFFFFF#000000##FFFFFF
##2D157E1.0013.811.5213.81
#FFFFFF13.811.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003081
Deuteranopia (green-blind)
#00297C
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2d157e;
/* rgb */ color: rgb(45, 21, 126);
/* oklch */ color: oklch(31.5% 0.161 282.5);
Tailwind
colors: {
  custom: {
    50: '#7257a5',
    500: '#2d157e',
    950: '#000000',
  },
}
SCSS
$custom: #2d157e;
$custom-light: #7257a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2d157e",
  "rgb": {
    "r": 45,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 253.714,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31465,
    "c": 0.16067,
    "h": 282.5
  },
  "luminance": 0.02601
}

Semantic roles & 50–950 ramp

primary
#2D157E
secondary
#98B33C
accent
#EE3AC5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D157E

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

Preview Lab → · Contrast checker → · Palette generator →

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