#2A1258#2A1258

#2A1258 is a dark, moderate violet. Relative luminance 0.016; OKLCH L 26.7% C 0.117 H 292.2°. Best body text is #FFFFFF at 15.84:1 contrast (WCAG AA passes).

Color values

HEX#2A1258
RGBrgb(42, 18, 88)
HSLhsl(261, 66%, 21%)
HSVhsv(261, 80%, 35%)
CMYKcmyk(52.3%, 79.5%, 0%, 65.5%)
CIE-LABlab(13.41, 30.06, -37.66)
CIE-LCHlch(13.41, 48.18, 308.59°)
OKLaboklab(26.7% 0.0442 -0.108)
OKLCHoklch(26.7% 0.117 292.2)
XYZxyz(2.9321, 1.6293, 9.3906)
Luminance0.0163 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1258 #405812
analogous
#121D58 #2A1258 #4D1258
triadic
#2A1258 #582A12 #12582A
tetradic
#2A1258 #58121D #405812 #12584D
square
#2A1258 #58121D #405812 #12584D
split-complementary
#2A1258 #584D12 #1D5812
monochromatic
#0C0519 #120825 #2A1258 #421C8B #5A27BE

Accessibility & contrast

On white

15.84
#2A1258 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.33
#2A1258 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1258
15.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1258#FFFFFF#000000##FFFFFF
##2A12581.0015.841.3315.84
#FFFFFF15.841.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.841.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2a1258;
/* rgb */ color: rgb(42, 18, 88);
/* oklch */ color: oklch(26.7% 0.117 292.2);
Tailwind
colors: {
  custom: {
    50: '#695288',
    500: '#2a1258',
    950: '#000000',
  },
}
SCSS
$custom: #2a1258;
$custom-light: #695288;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1258",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 88
  },
  "hsl": {
    "h": 260.571,
    "s": 66.038,
    "l": 20.784
  },
  "oklch": {
    "l": 0.26695,
    "c": 0.11674,
    "h": 292.2
  },
  "luminance": 0.01629
}

Semantic roles & 50–950 ramp

primary
#2A1258
secondary
#719135
accent
#E93FAF
background
#F6F4F8
surface
#EBE7F0
border
#C6C3CB
text
#07020B
muted
#7A787C

Preview Lab

Preview with #2A1258

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

Preview Lab → · Contrast checker → · Palette generator →

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