#2D157C#2D157C

#2D157C is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.2% C 0.158 H 283.0°. Best body text is #FFFFFF at 13.91:1 contrast (WCAG AA passes).

Color values

HEX#2D157C
RGBrgb(45, 21, 124)
HSLhsl(254, 71%, 28%)
HSVhsv(254, 83%, 49%)
CMYKcmyk(63.7%, 83.1%, 0%, 51.4%)
CIE-LABlab(18.14, 40.04, -53.48)
CIE-LCHlch(18.14, 66.80, 306.82°)
OKLaboklab(31.24% 0.0355 -0.1542)
OKLCHoklch(31.24% 0.158 283)
XYZxyz(4.9873, 2.5491, 19.2941)
Luminance0.0255 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D157C #647C15
analogous
#15307C #2D157C #60157C
triadic
#2D157C #7C2D15 #157C2D
tetradic
#2D157C #7C1530 #647C15 #157C60
square
#2D157C #7C1530 #647C15 #157C60
split-complementary
#2D157C #7C6015 #307C15
monochromatic
#09041A #1A0C48 #2D157C #401EB0 #5830DC

Accessibility & contrast

On white

13.91
#2D157C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#2D157C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D157C
13.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D157C#FFFFFF#000000##FFFFFF
##2D157C1.0013.911.5113.91
#FFFFFF13.911.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7F
Deuteranopia (green-blind)
#00297A
Tritanopia (blue-blind)
#003449
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2d157c;
/* rgb */ color: rgb(45, 21, 124);
/* oklch */ color: oklch(31.2% 0.158 283.0);
Tailwind
colors: {
  custom: {
    50: '#7257a3',
    500: '#2d157c',
    950: '#000000',
  },
}
SCSS
$custom: #2d157c;
$custom-light: #7257a3;
$custom-dark: #000000;
JSON
{
  "hex": "#2d157c",
  "rgb": {
    "r": 45,
    "g": 21,
    "b": 124
  },
  "hsl": {
    "h": 253.981,
    "s": 71.034,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31241,
    "c": 0.15826,
    "h": 283
  },
  "luminance": 0.02549
}

Semantic roles & 50–950 ramp

primary
#2D157C
secondary
#96B13C
accent
#EE3AC4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D157C

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

Preview Lab → · Contrast checker → · Palette generator →

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