#2A157F#2A157F

#2A157F is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.3% C 0.162 H 280.5°. Best body text is #FFFFFF at 13.89:1 contrast (WCAG AA passes).

Color values

HEX#2A157F
RGBrgb(42, 21, 127)
HSLhsl(252, 72%, 29%)
HSVhsv(252, 83%, 50%)
CMYKcmyk(66.9%, 83.5%, 0%, 50.2%)
CIE-LABlab(18.19, 40.63, -55.31)
CIE-LCHlch(18.19, 68.63, 306.30°)
OKLaboklab(31.31% 0.0297 -0.1596)
OKLCHoklch(31.31% 0.162 280.5)
XYZxyz(5.0526, 2.5605, 20.3025)
Luminance0.0256 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A157F #6A7F15
analogous
#15357F #2A157F #5F157F
triadic
#2A157F #7F2A15 #157F2A
tetradic
#2A157F #7F1535 #6A7F15 #157F5F
square
#2A157F #7F1535 #6A7F15 #157F5F
split-complementary
#2A157F #7F5F15 #357F15
monochromatic
#09041A #190C4A #2A157F #3B1EB4 #5331DD

Accessibility & contrast

On white

13.89
#2A157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A157F
13.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A157F#FFFFFF#000000##FFFFFF
##2A157F1.0013.891.5113.89
#FFFFFF13.891.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003082
Deuteranopia (green-blind)
#00287D
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2a157f;
/* rgb */ color: rgb(42, 21, 127);
/* oklch */ color: oklch(31.3% 0.162 280.5);
Tailwind
colors: {
  custom: {
    50: '#7157a5',
    500: '#2a157f',
    950: '#000000',
  },
}
SCSS
$custom: #2a157f;
$custom-light: #7157a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2a157f",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 251.887,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31306,
    "c": 0.16239,
    "h": 280.5
  },
  "luminance": 0.02561
}

Semantic roles & 50–950 ramp

primary
#2A157F
secondary
#9CB43C
accent
#EE39CB
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A157F

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

Preview Lab → · Contrast checker → · Palette generator →

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