#2A166A#2A166A

#2A166A is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.1% C 0.135 H 285.3°. Best body text is #FFFFFF at 14.77:1 contrast (WCAG AA passes).

Color values

HEX#2A166A
RGBrgb(42, 22, 106)
HSLhsl(254, 66%, 25%)
HSVhsv(254, 79%, 42%)
CMYKcmyk(60.4%, 79.2%, 0%, 58.4%)
CIE-LABlab(16.04, 33.52, -45.32)
CIE-LCHlch(16.04, 56.37, 306.49°)
OKLaboklab(29.11% 0.0356 -0.1305)
OKLCHoklch(29.11% 0.135 285.3)
XYZxyz(3.8425, 2.1064, 13.8370)
Luminance0.0211 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A166A #566A16
analogous
#162C6A #2A166A #54166A
triadic
#2A166A #6A2A16 #166A2A
tetradic
#2A166A #6A162C #566A16 #166A54
square
#2A166A #6A162C #566A16 #166A54
split-complementary
#2A166A #6A5416 #2C6A16
monochromatic
#0A0519 #160B37 #2A166A #3E219D #522BCF

Accessibility & contrast

On white

14.77
#2A166A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#2A166A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A166A
14.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A166A#FFFFFF#000000##FFFFFF
##2A166A1.0014.771.4214.77
#FFFFFF14.771.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A6C
Deuteranopia (green-blind)
#002568
Tritanopia (blue-blind)
#092E3F
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2a166a;
/* rgb */ color: rgb(42, 22, 106);
/* oklch */ color: oklch(29.1% 0.135 285.3);
Tailwind
colors: {
  custom: {
    50: '#6c5696',
    500: '#2a166a',
    950: '#000000',
  },
}
SCSS
$custom: #2a166a;
$custom-light: #6c5696;
$custom-dark: #000000;
JSON
{
  "hex": "#2a166a",
  "rgb": {
    "r": 42,
    "g": 22,
    "b": 106
  },
  "hsl": {
    "h": 254.286,
    "s": 65.625,
    "l": 25.098
  },
  "oklch": {
    "l": 0.29109,
    "c": 0.13528,
    "h": 285.3
  },
  "luminance": 0.02107
}

Semantic roles & 50–950 ramp

primary
#2A166A
secondary
#88A03B
accent
#E93FC0
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #2A166A

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

Preview Lab → · Contrast checker → · Palette generator →

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