#2A118E#2A118E

#2A118E is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.7% C 0.183 H 278.2°. Best body text is #FFFFFF at 13.38:1 contrast (WCAG AA passes).

Color values

HEX#2A118E
RGBrgb(42, 17, 142)
HSLhsl(252, 79%, 31%)
HSVhsv(252, 88%, 56%)
CMYKcmyk(70.4%, 88%, 0%, 44.3%)
CIE-LABlab(19.41, 46.84, -62.73)
CIE-LCHlch(19.41, 78.28, 306.75°)
OKLaboklab(32.67% 0.0262 -0.1811)
OKLCHoklch(32.67% 0.183 278.2)
XYZxyz(6.0362, 2.8456, 25.8171)
Luminance0.0285 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A118E #758E11
analogous
#11368E #2A118E #68118E
triadic
#2A118E #8E2A11 #118E2A
tetradic
#2A118E #8E1136 #758E11 #118E68
square
#2A118E #8E1136 #758E11 #118E68
split-complementary
#2A118E #8E6811 #368E11
monochromatic
#0A0421 #1A0A57 #2A118E #3A18C5 #5733E7

Accessibility & contrast

On white

13.38
#2A118E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#2A118E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A118E
13.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A118E#FFFFFF#000000##FFFFFF
##2A118E1.0013.381.5713.38
#FFFFFF13.381.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003491
Deuteranopia (green-blind)
#002A8C
Tritanopia (blue-blind)
#003B53
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #2a118e;
/* rgb */ color: rgb(42, 17, 142);
/* oklch */ color: oklch(32.7% 0.183 278.2);
Tailwind
colors: {
  custom: {
    50: '#7556b0',
    500: '#2a118e',
    950: '#000000',
  },
}
SCSS
$custom: #2a118e;
$custom-light: #7556b0;
$custom-dark: #000000;
JSON
{
  "hex": "#2a118e",
  "rgb": {
    "r": 42,
    "g": 17,
    "b": 142
  },
  "hsl": {
    "h": 252,
    "s": 78.616,
    "l": 31.176
  },
  "oklch": {
    "l": 0.32672,
    "c": 0.18301,
    "h": 278.2
  },
  "luminance": 0.02846
}

Semantic roles & 50–950 ramp

primary
#2A118E
secondary
#A7C238
accent
#F533CE
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0311
muted
#7C7880

Preview Lab

Preview with #2A118E

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

Preview Lab → · Contrast checker → · Palette generator →

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