#2A166D#2A166D

#2A166D is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.4% C 0.139 H 284.5°. Best body text is #FFFFFF at 14.64:1 contrast (WCAG AA passes).

Color values

HEX#2A166D
RGBrgb(42, 22, 109)
HSLhsl(254, 66%, 26%)
HSVhsv(254, 80%, 43%)
CMYKcmyk(61.5%, 79.8%, 0%, 57.3%)
CIE-LABlab(16.35, 34.48, -46.75)
CIE-LCHlch(16.35, 58.09, 306.40°)
OKLaboklab(29.43% 0.0347 -0.1347)
OKLCHoklch(29.43% 0.139 284.5)
XYZxyz(4.0012, 2.1699, 14.6730)
Luminance0.0217 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A166D #596D16
analogous
#162D6D #2A166D #55166D
triadic
#2A166D #6D2A16 #166D2A
tetradic
#2A166D #6D162D #596D16 #166D55
square
#2A166D #6D162D #596D16 #166D55
split-complementary
#2A166D #6D5516 #2D6D16
monochromatic
#0A0519 #160C3A #2A166D #3E20A0 #512BD3

Accessibility & contrast

On white

14.64
#2A166D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#2A166D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A166D
14.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A166D#FFFFFF#000000##FFFFFF
##2A166D1.0014.641.4314.64
#FFFFFF14.641.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6F
Deuteranopia (green-blind)
#00266B
Tritanopia (blue-blind)
#042F41
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2a166d;
/* rgb */ color: rgb(42, 22, 109);
/* oklch */ color: oklch(29.4% 0.139 284.5);
Tailwind
colors: {
  custom: {
    50: '#6d5698',
    500: '#2a166d',
    950: '#000000',
  },
}
SCSS
$custom: #2a166d;
$custom-light: #6d5698;
$custom-dark: #000000;
JSON
{
  "hex": "#2a166d",
  "rgb": {
    "r": 42,
    "g": 22,
    "b": 109
  },
  "hsl": {
    "h": 253.793,
    "s": 66.412,
    "l": 25.686
  },
  "oklch": {
    "l": 0.29429,
    "c": 0.13912,
    "h": 284.5
  },
  "luminance": 0.0217
}

Semantic roles & 50–950 ramp

primary
#2A166D
secondary
#8BA33C
accent
#E93EC2
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#08030E
muted
#7A787E

Preview Lab

Preview with #2A166D

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

Preview Lab → · Contrast checker → · Palette generator →

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