#2B157D#2B157D

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

Color values

HEX#2B157D
RGBrgb(43, 21, 125)
HSLhsl(253, 71%, 29%)
HSVhsv(253, 83%, 49%)
CMYKcmyk(65.6%, 83.2%, 0%, 51%)
CIE-LABlab(18.05, 40.12, -54.26)
CIE-LCHlch(18.05, 67.48, 306.48°)
OKLaboklab(31.17% 0.032 -0.1566)
OKLCHoklch(31.17% 0.16 281.5)
XYZxyz(4.9649, 2.5302, 19.6248)
Luminance0.0253 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B157D #677D15
analogous
#15337D #2B157D #5F157D
triadic
#2B157D #7D2B15 #157D2B
tetradic
#2B157D #7D1533 #677D15 #157D5F
square
#2B157D #7D1533 #677D15 #157D5F
split-complementary
#2B157D #7D5F15 #337D15
monochromatic
#09041A #190C49 #2B157D #3D1EB1 #5530DC

Accessibility & contrast

On white

13.94
#2B157D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2B157D
13.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B157D#FFFFFF#000000##FFFFFF
##2B157D1.0013.941.5113.94
#FFFFFF13.941.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003080
Deuteranopia (green-blind)
#00287B
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2b157d;
/* rgb */ color: rgb(43, 21, 125);
/* oklch */ color: oklch(31.2% 0.160 281.5);
Tailwind
colors: {
  custom: {
    50: '#7157a4',
    500: '#2b157d',
    950: '#000000',
  },
}
SCSS
$custom: #2b157d;
$custom-light: #7157a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2b157d",
  "rgb": {
    "r": 43,
    "g": 21,
    "b": 125
  },
  "hsl": {
    "h": 252.692,
    "s": 71.233,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31168,
    "c": 0.15979,
    "h": 281.5
  },
  "luminance": 0.02531
}

Semantic roles & 50–950 ramp

primary
#2B157D
secondary
#99B23C
accent
#EE3AC8
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2B157D

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

Preview Lab → · Contrast checker → · Palette generator →

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