#2A1262#2A1262

#2A1262 is a dark, vivid violet. Relative luminance 0.018; OKLCH L 27.7% C 0.129 H 288.6°. Best body text is #FFFFFF at 15.43:1 contrast (WCAG AA passes).

Color values

HEX#2A1262
RGBrgb(42, 18, 98)
HSLhsl(258, 69%, 23%)
HSVhsv(258, 82%, 38%)
CMYKcmyk(57.1%, 81.6%, 0%, 61.6%)
CIE-LABlab(14.44, 33.15, -42.67)
CIE-LCHlch(14.44, 54.03, 307.84°)
OKLaboklab(27.73% 0.0412 -0.1227)
OKLCHoklch(27.73% 0.129 288.6)
XYZxyz(3.3751, 1.8065, 11.7238)
Luminance0.0181 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1262 #4A6212
analogous
#122262 #2A1262 #521262
triadic
#2A1262 #622A12 #12622A
tetradic
#2A1262 #621222 #4A6212 #126252
square
#2A1262 #621222 #4A6212 #126252
split-complementary
#2A1262 #625212 #226212
monochromatic
#0B051A #14092E #2A1262 #401B96 #5625C9

Accessibility & contrast

On white

15.43
#2A1262 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#2A1262 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1262
15.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1262#FFFFFF#000000##FFFFFF
##2A12621.0015.431.3615.43
#FFFFFF15.431.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002664
Deuteranopia (green-blind)
#002261
Tritanopia (blue-blind)
#142939
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #2a1262;
/* rgb */ color: rgb(42, 18, 98);
/* oklch */ color: oklch(27.7% 0.129 288.6);
Tailwind
colors: {
  custom: {
    50: '#6b5390',
    500: '#2a1262',
    950: '#000000',
  },
}
SCSS
$custom: #2a1262;
$custom-light: #6b5390;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1262",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 98
  },
  "hsl": {
    "h": 258,
    "s": 68.966,
    "l": 22.745
  },
  "oklch": {
    "l": 0.27732,
    "c": 0.12947,
    "h": 288.6
  },
  "luminance": 0.01807
}

Semantic roles & 50–950 ramp

primary
#2A1262
secondary
#7C9A36
accent
#EC3CB7
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#07020C
muted
#7A787D

Preview Lab

Preview with #2A1262

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

Preview Lab → · Contrast checker → · Palette generator →

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