#2A157E#2A157E

#2A157E is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.2% C 0.161 H 280.7°. Best body text is #FFFFFF at 13.93:1 contrast (WCAG AA passes).

Color values

HEX#2A157E
RGBrgb(42, 21, 126)
HSLhsl(252, 71%, 29%)
HSVhsv(252, 83%, 49%)
CMYKcmyk(66.7%, 83.3%, 0%, 50.6%)
CIE-LABlab(18.07, 40.32, -54.87)
CIE-LCHlch(18.07, 68.09, 306.31°)
OKLaboklab(31.19% 0.03 -0.1584)
OKLCHoklch(31.19% 0.161 280.7)
XYZxyz(4.9877, 2.5345, 19.9610)
Luminance0.0254 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A157E #697E15
analogous
#15357E #2A157E #5F157E
triadic
#2A157E #7E2A15 #157E2A
tetradic
#2A157E #7E1535 #697E15 #157E5F
square
#2A157E #7E1535 #697E15 #157E5F
split-complementary
#2A157E #7E5F15 #357E15
monochromatic
#09041A #190C4A #2A157E #3B1EB2 #5331DD

Accessibility & contrast

On white

13.93
#2A157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#2A157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A157E
13.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A157E#FFFFFF#000000##FFFFFF
##2A157E1.0013.931.5113.93
#FFFFFF13.931.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003081
Deuteranopia (green-blind)
#00287C
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2a157e;
/* rgb */ color: rgb(42, 21, 126);
/* oklch */ color: oklch(31.2% 0.161 280.7);
Tailwind
colors: {
  custom: {
    50: '#7157a5',
    500: '#2a157e',
    950: '#000000',
  },
}
SCSS
$custom: #2a157e;
$custom-light: #7157a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2a157e",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 252,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31192,
    "c": 0.16118,
    "h": 280.7
  },
  "luminance": 0.02535
}

Semantic roles & 50–950 ramp

primary
#2A157E
secondary
#9BB33C
accent
#EE3ACA
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A157E

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

Preview Lab → · Contrast checker → · Palette generator →

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