#2A166C#2A166C

#2A166C is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.3% C 0.138 H 284.7°. Best body text is #FFFFFF at 14.69:1 contrast (WCAG AA passes).

Color values

HEX#2A166C
RGBrgb(42, 22, 108)
HSLhsl(254, 66%, 25%)
HSVhsv(254, 80%, 42%)
CMYKcmyk(61.1%, 79.6%, 0%, 57.6%)
CIE-LABlab(16.25, 34.16, -46.28)
CIE-LCHlch(16.25, 57.52, 306.43°)
OKLaboklab(29.32% 0.035 -0.1333)
OKLCHoklch(29.32% 0.138 284.7)
XYZxyz(3.9477, 2.1485, 14.3911)
Luminance0.0215 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A166C #586C16
analogous
#162D6C #2A166C #55166C
triadic
#2A166C #6C2A16 #166C2A
tetradic
#2A166C #6C162D #586C16 #166C55
square
#2A166C #6C162D #586C16 #166C55
split-complementary
#2A166C #6C5516 #2D6C16
monochromatic
#0A0519 #160C39 #2A166C #3E209F #522BD2

Accessibility & contrast

On white

14.69
#2A166C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A166C
14.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A166C#FFFFFF#000000##FFFFFF
##2A166C1.0014.691.4314.69
#FFFFFF14.691.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6E
Deuteranopia (green-blind)
#00266A
Tritanopia (blue-blind)
#052E40
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2a166c;
/* rgb */ color: rgb(42, 22, 108);
/* oklch */ color: oklch(29.3% 0.138 284.7);
Tailwind
colors: {
  custom: {
    50: '#6d5697',
    500: '#2a166c',
    950: '#000000',
  },
}
SCSS
$custom: #2a166c;
$custom-light: #6d5697;
$custom-dark: #000000;
JSON
{
  "hex": "#2a166c",
  "rgb": {
    "r": 42,
    "g": 22,
    "b": 108
  },
  "hsl": {
    "h": 253.953,
    "s": 66.154,
    "l": 25.49
  },
  "oklch": {
    "l": 0.29322,
    "c": 0.13784,
    "h": 284.7
  },
  "luminance": 0.02149
}

Semantic roles & 50–950 ramp

primary
#2A166C
secondary
#8AA23C
accent
#E93FC1
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#08030E
muted
#7A787E

Preview Lab

Preview with #2A166C

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

Preview Lab → · Contrast checker → · Palette generator →

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