#2A1F4E#2A1F4E

#2A1F4E is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.0% C 0.083 H 290.8°. Best body text is #FFFFFF at 14.95:1 contrast (WCAG AA passes).

Color values

HEX#2A1F4E
RGBrgb(42, 31, 78)
HSLhsl(254, 43%, 21%)
HSVhsv(254, 60%, 31%)
CMYKcmyk(46.2%, 60.3%, 0%, 69.4%)
CIE-LABlab(15.60, 18.56, -27.31)
CIE-LCHlch(15.60, 33.02, 304.20°)
OKLaboklab(28.01% 0.0295 -0.0776)
OKLCHoklch(28.01% 0.083 290.8)
XYZxyz(2.8196, 2.0222, 7.4480)
Luminance0.0202 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F4E #434E1F
analogous
#1F2C4E #2A1F4E #421F4E
triadic
#2A1F4E #4E2A1F #1F4E2A
tetradic
#2A1F4E #4E1F2C #434E1F #1F4E42
square
#2A1F4E #4E1F2C #434E1F #1F4E42
split-complementary
#2A1F4E #4E421F #2C4E1F
monochromatic
#0C0916 #120E22 #2A1F4E #42307A #5942A6

Accessibility & contrast

On white

14.95
#2A1F4E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#2A1F4E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1F4E
14.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F4E#FFFFFF#000000##FFFFFF
##2A1F4E1.0014.951.4014.95
#FFFFFF14.951.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF14.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#082850
Deuteranopia (green-blind)
#0A264D
Tritanopia (blue-blind)
#202933
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #2a1f4e;
/* rgb */ color: rgb(42, 31, 78);
/* oklch */ color: oklch(28.0% 0.083 290.8);
Tailwind
colors: {
  custom: {
    50: '#665b80',
    500: '#2a1f4e',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f4e;
$custom-light: #665b80;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f4e",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 78
  },
  "hsl": {
    "h": 254.043,
    "s": 43.119,
    "l": 21.373
  },
  "oklch": {
    "l": 0.28012,
    "c": 0.08307,
    "h": 290.8
  },
  "luminance": 0.02022
}

Semantic roles & 50–950 ramp

primary
#2A1F4E
secondary
#758346
accent
#D355B5
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#06040A
muted
#7A797C

Preview Lab

Preview with #2A1F4E

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

Preview Lab → · Contrast checker → · Palette generator →

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