#2A127E#2A127E

#2A127E is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.9% C 0.164 H 281.1°. Best body text is #FFFFFF at 14.13:1 contrast (WCAG AA passes).

Color values

HEX#2A127E
RGBrgb(42, 18, 126)
HSLhsl(253, 75%, 28%)
HSVhsv(253, 86%, 49%)
CMYKcmyk(66.7%, 85.7%, 0%, 50.6%)
CIE-LABlab(17.60, 41.70, -55.65)
CIE-LCHlch(17.60, 69.54, 306.85°)
OKLaboklab(30.87% 0.0316 -0.1606)
OKLCHoklch(30.87% 0.164 281.1)
XYZxyz(4.9359, 2.4308, 19.9437)
Luminance0.0243 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A127E #667E12
analogous
#12307E #2A127E #60127E
triadic
#2A127E #7E2A12 #127E2A
tetradic
#2A127E #7E1230 #667E12 #127E60
square
#2A127E #7E1230 #667E12 #127E60
split-complementary
#2A127E #7E6012 #307E12
monochromatic
#09041B #180A48 #2A127E #3C1AB4 #522AE1

Accessibility & contrast

On white

14.13
#2A127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#2A127E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A127E
14.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A127E#FFFFFF#000000##FFFFFF
##2A127E1.0014.131.4914.13
#FFFFFF14.131.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F81
Deuteranopia (green-blind)
#00277C
Tritanopia (blue-blind)
#00344A
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2a127e;
/* rgb */ color: rgb(42, 18, 126);
/* oklch */ color: oklch(30.9% 0.164 281.1);
Tailwind
colors: {
  custom: {
    50: '#7155a5',
    500: '#2a127e',
    950: '#000000',
  },
}
SCSS
$custom: #2a127e;
$custom-light: #7155a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2a127e",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 253.333,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.30866,
    "c": 0.16365,
    "h": 281.1
  },
  "luminance": 0.02431
}

Semantic roles & 50–950 ramp

primary
#2A127E
secondary
#98B438
accent
#F236C8
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A127E

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

Preview Lab → · Contrast checker → · Palette generator →

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