#2D157B#2D157B

#2D157B is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.1% C 0.157 H 283.2°. Best body text is #FFFFFF at 13.96:1 contrast (WCAG AA passes).

Color values

HEX#2D157B
RGBrgb(45, 21, 123)
HSLhsl(254, 71%, 28%)
HSVhsv(254, 83%, 48%)
CMYKcmyk(63.4%, 82.9%, 0%, 51.8%)
CIE-LABlab(18.03, 39.73, -53.02)
CIE-LCHlch(18.03, 66.26, 306.85°)
OKLaboklab(31.13% 0.0359 -0.1529)
OKLCHoklch(31.13% 0.157 283.2)
XYZxyz(4.9244, 2.5239, 18.9627)
Luminance0.0252 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D157B #637B15
analogous
#15307B #2D157B #60157B
triadic
#2D157B #7B2D15 #157B2D
tetradic
#2D157B #7B1530 #637B15 #157B60
square
#2D157B #7B1530 #637B15 #157B60
split-complementary
#2D157B #7B6015 #307B15
monochromatic
#0A041A #1A0C47 #2D157B #401EAF #582FDB

Accessibility & contrast

On white

13.96
#2D157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#2D157B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D157B
13.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D157B#FFFFFF#000000##FFFFFF
##2D157B1.0013.961.5013.96
#FFFFFF13.961.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF13.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7E
Deuteranopia (green-blind)
#002979
Tritanopia (blue-blind)
#003448
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2d157b;
/* rgb */ color: rgb(45, 21, 123);
/* oklch */ color: oklch(31.1% 0.157 283.2);
Tailwind
colors: {
  custom: {
    50: '#7157a2',
    500: '#2d157b',
    950: '#000000',
  },
}
SCSS
$custom: #2d157b;
$custom-light: #7157a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2d157b",
  "rgb": {
    "r": 45,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 254.118,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.3113,
    "c": 0.15705,
    "h": 283.2
  },
  "luminance": 0.02524
}

Semantic roles & 50–950 ramp

primary
#2D157B
secondary
#95B03B
accent
#EE3AC3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D157B

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

Preview Lab → · Contrast checker → · Palette generator →

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