#2B157A#2B157A

#2B157A is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.8% C 0.156 H 282.2°. Best body text is #FFFFFF at 14.08:1 contrast (WCAG AA passes).

Color values

HEX#2B157A
RGBrgb(43, 21, 122)
HSLhsl(253, 71%, 28%)
HSVhsv(253, 83%, 48%)
CMYKcmyk(64.8%, 82.8%, 0%, 52.2%)
CIE-LABlab(17.71, 39.20, -52.91)
CIE-LCHlch(17.71, 65.85, 306.53°)
OKLaboklab(30.83% 0.033 -0.1526)
OKLCHoklch(30.83% 0.156 282.2)
XYZxyz(4.7762, 2.4547, 18.6307)
Luminance0.0245 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B157A #647A15
analogous
#15327A #2B157A #5D157A
triadic
#2B157A #7A2B15 #157A2B
tetradic
#2B157A #7A1532 #647A15 #157A5D
square
#2B157A #7A1532 #647A15 #157A5D
split-complementary
#2B157A #7A5D15 #327A15
monochromatic
#09041A #190C46 #2B157A #3D1EAE #542EDB

Accessibility & contrast

On white

14.08
#2B157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#2B157A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B157A
14.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B157A#FFFFFF#000000##FFFFFF
##2B157A1.0014.081.4914.08
#FFFFFF14.081.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7D
Deuteranopia (green-blind)
#002878
Tritanopia (blue-blind)
#003448
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2b157a;
/* rgb */ color: rgb(43, 21, 122);
/* oklch */ color: oklch(30.8% 0.156 282.2);
Tailwind
colors: {
  custom: {
    50: '#7056a2',
    500: '#2b157a',
    950: '#000000',
  },
}
SCSS
$custom: #2b157a;
$custom-light: #7056a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2b157a",
  "rgb": {
    "r": 43,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 253.069,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.30829,
    "c": 0.15614,
    "h": 282.2
  },
  "luminance": 0.02455
}

Semantic roles & 50–950 ramp

primary
#2B157A
secondary
#96AF3B
accent
#ED3AC6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #2B157A

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

Preview Lab → · Contrast checker → · Palette generator →

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