#2B158F#2B158F

#2B158F is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.2% C 0.181 H 278.2°. Best body text is #FFFFFF at 13.07:1 contrast (WCAG AA passes).

Color values

HEX#2B158F
RGBrgb(43, 21, 143)
HSLhsl(251, 74%, 32%)
HSVhsv(251, 85%, 56%)
CMYKcmyk(69.9%, 85.3%, 0%, 43.9%)
CIE-LABlab(20.17, 45.58, -62.09)
CIE-LCHlch(20.17, 77.02, 306.28°)
OKLaboklab(33.25% 0.0259 -0.1793)
OKLCHoklch(33.25% 0.181 278.2)
XYZxyz(6.2208, 3.0325, 26.2388)
Luminance0.0303 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B158F #798F15
analogous
#153C8F #2B158F #68158F
triadic
#2B158F #8F2B15 #158F2B
tetradic
#2B158F #8F153C #798F15 #158F68
square
#2B158F #8F153C #798F15 #158F68
split-complementary
#2B158F #8F6815 #3C8F15
monochromatic
#0B0524 #1B0D5A #2B158F #3B1DC4 #5A3CE2

Accessibility & contrast

On white

13.07
#2B158F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#2B158F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B158F
13.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B158F#FFFFFF#000000##FFFFFF
##2B158F1.0013.071.6113.07
#FFFFFF13.071.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003592
Deuteranopia (green-blind)
#002C8D
Tritanopia (blue-blind)
#003C54
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2b158f;
/* rgb */ color: rgb(43, 21, 143);
/* oklch */ color: oklch(33.2% 0.181 278.2);
Tailwind
colors: {
  custom: {
    50: '#7558b1',
    500: '#2b158f',
    950: '#000000',
  },
}
SCSS
$custom: #2b158f;
$custom-light: #7558b1;
$custom-dark: #000000;
JSON
{
  "hex": "#2b158f",
  "rgb": {
    "r": 43,
    "g": 21,
    "b": 143
  },
  "hsl": {
    "h": 250.82,
    "s": 74.39,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33249,
    "c": 0.18119,
    "h": 278.2
  },
  "luminance": 0.03033
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2B158F

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

Preview Lab → · Contrast checker → · Palette generator →

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