#2A1158#2A1158

#2A1158 is a dark, moderate violet. Relative luminance 0.016; OKLCH L 26.6% C 0.118 H 292.5°. Best body text is #FFFFFF at 15.91:1 contrast (WCAG AA passes).

Color values

HEX#2A1158
RGBrgb(42, 17, 88)
HSLhsl(261, 68%, 21%)
HSVhsv(261, 81%, 35%)
CMYKcmyk(52.3%, 80.7%, 0%, 65.5%)
CIE-LABlab(13.22, 30.60, -37.98)
CIE-LCHlch(13.22, 48.77, 308.86°)
OKLaboklab(26.56% 0.0452 -0.109)
OKLCHoklch(26.56% 0.118 292.5)
XYZxyz(2.9163, 1.5976, 9.3853)
Luminance0.0160 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1158 #3F5811
analogous
#111B58 #2A1158 #4D1158
triadic
#2A1158 #582A11 #11582A
tetradic
#2A1158 #58111B #3F5811 #11584D
square
#2A1158 #58111B #3F5811 #11584D
split-complementary
#2A1158 #584D11 #1B5811
monochromatic
#0C051A #120725 #2A1158 #421B8B #5B25BF

Accessibility & contrast

On white

15.91
#2A1158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.32
#2A1158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1158
15.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1158#FFFFFF#000000##FFFFFF
##2A11581.0015.911.3215.91
#FFFFFF15.911.0021.001.00
#0000001.3221.001.0021.00
##FFFFFF15.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00235A
Deuteranopia (green-blind)
#002157
Tritanopia (blue-blind)
#1B2433
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #2a1158;
/* rgb */ color: rgb(42, 17, 88);
/* oklch */ color: oklch(26.6% 0.118 292.5);
Tailwind
colors: {
  custom: {
    50: '#695288',
    500: '#2a1158',
    950: '#000000',
  },
}
SCSS
$custom: #2a1158;
$custom-light: #695288;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1158",
  "rgb": {
    "r": 42,
    "g": 17,
    "b": 88
  },
  "hsl": {
    "h": 261.127,
    "s": 67.619,
    "l": 20.588
  },
  "oklch": {
    "l": 0.26559,
    "c": 0.11796,
    "h": 292.5
  },
  "luminance": 0.01598
}

Semantic roles & 50–950 ramp

primary
#2A1158
secondary
#709134
accent
#EA3DAE
background
#F6F4F8
surface
#EBE7F0
border
#C6C3CB
text
#07020B
muted
#7A787C

Preview Lab

Preview with #2A1158

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

Preview Lab → · Contrast checker → · Palette generator →

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