#2B158E#2B158E

#2B158E is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.1% C 0.180 H 278.4°. Best body text is #FFFFFF at 13.12:1 contrast (WCAG AA passes).

Color values

HEX#2B158E
RGBrgb(43, 21, 142)
HSLhsl(251, 74%, 32%)
HSVhsv(251, 85%, 56%)
CMYKcmyk(69.7%, 85.2%, 0%, 44.3%)
CIE-LABlab(20.05, 45.28, -61.67)
CIE-LCHlch(20.05, 76.50, 306.29°)
OKLaboklab(33.13% 0.0263 -0.1781)
OKLCHoklch(33.13% 0.18 278.4)
XYZxyz(6.1453, 3.0024, 25.8416)
Luminance0.0300 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B158E #788E15
analogous
#153C8E #2B158E #68158E
triadic
#2B158E #8E2B15 #158E2B
tetradic
#2B158E #8E153C #788E15 #158E68
square
#2B158E #8E153C #788E15 #158E68
split-complementary
#2B158E #8E6815 #3C8E15
monochromatic
#0B0523 #1B0D59 #2B158E #3B1DC3 #5A3BE2

Accessibility & contrast

On white

13.12
#2B158E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#2B158E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B158E
13.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B158E#FFFFFF#000000##FFFFFF
##2B158E1.0013.121.6013.12
#FFFFFF13.121.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003591
Deuteranopia (green-blind)
#002B8C
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2b158e;
/* rgb */ color: rgb(43, 21, 142);
/* oklch */ color: oklch(33.1% 0.180 278.4);
Tailwind
colors: {
  custom: {
    50: '#7558b0',
    500: '#2b158e',
    950: '#000000',
  },
}
SCSS
$custom: #2b158e;
$custom-light: #7558b0;
$custom-dark: #000000;
JSON
{
  "hex": "#2b158e",
  "rgb": {
    "r": 43,
    "g": 21,
    "b": 142
  },
  "hsl": {
    "h": 250.909,
    "s": 74.233,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33131,
    "c": 0.18002,
    "h": 278.4
  },
  "luminance": 0.03003
}

Semantic roles & 50–950 ramp

primary
#2B158E
secondary
#AAC23D
accent
#F137CF
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2B158E

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

Preview Lab → · Contrast checker → · Palette generator →

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