#2A117E#2A117E

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

Color values

HEX#2A117E
RGBrgb(42, 17, 126)
HSLhsl(254, 76%, 28%)
HSVhsv(254, 87%, 49%)
CMYKcmyk(66.7%, 86.5%, 0%, 50.6%)
CIE-LABlab(17.46, 42.14, -55.89)
CIE-LCHlch(17.46, 69.99, 307.01°)
OKLaboklab(30.77% 0.032 -0.1613)
OKLCHoklch(30.77% 0.164 281.2)
XYZxyz(4.9200, 2.3991, 19.9384)
Luminance0.0240 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A117E #657E11
analogous
#112F7E #2A117E #60117E
triadic
#2A117E #7E2A11 #117E2A
tetradic
#2A117E #7E112F #657E11 #117E60
square
#2A117E #7E112F #657E11 #117E60
split-complementary
#2A117E #7E6011 #2F7E11
monochromatic
#09041B #180A48 #2A117E #3C18B4 #5227E2

Accessibility & contrast

On white

14.19
#2A117E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#2A117E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A117E
14.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A117E#FFFFFF#000000##FFFFFF
##2A117E1.0014.191.4814.19
#FFFFFF14.191.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E81
Deuteranopia (green-blind)
#00277C
Tritanopia (blue-blind)
#003449
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2a117e;
/* rgb */ color: rgb(42, 17, 126);
/* oklch */ color: oklch(30.8% 0.164 281.2);
Tailwind
colors: {
  custom: {
    50: '#7155a5',
    500: '#2a117e',
    950: '#000000',
  },
}
SCSS
$custom: #2a117e;
$custom-light: #7155a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2a117e",
  "rgb": {
    "r": 42,
    "g": 17,
    "b": 126
  },
  "hsl": {
    "h": 253.761,
    "s": 76.224,
    "l": 28.039
  },
  "oklch": {
    "l": 0.30766,
    "c": 0.16442,
    "h": 281.2
  },
  "luminance": 0.02399
}

Semantic roles & 50–950 ramp

primary
#2A117E
secondary
#97B437
accent
#F335C7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A117E

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

Preview Lab → · Contrast checker → · Palette generator →

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