#2A1866#2A1866

#2A1866 is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.0% C 0.128 H 285.9°. Best body text is #FFFFFF at 14.78:1 contrast (WCAG AA passes).

Color values

HEX#2A1866
RGBrgb(42, 24, 102)
HSLhsl(254, 62%, 25%)
HSVhsv(254, 76%, 40%)
CMYKcmyk(58.8%, 76.5%, 0%, 60%)
CIE-LABlab(16.03, 31.09, -42.71)
CIE-LCHlch(16.03, 52.82, 306.05°)
OKLaboklab(28.98% 0.035 -0.1229)
OKLCHoklch(28.98% 0.128 285.9)
XYZxyz(3.6790, 2.1046, 12.7802)
Luminance0.0210 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1866 #546618
analogous
#182D66 #2A1866 #511866
triadic
#2A1866 #662A18 #18662A
tetradic
#2A1866 #66182D #546618 #186651
square
#2A1866 #66182D #546618 #186651
split-complementary
#2A1866 #665118 #2D6618
monochromatic
#0A0619 #160C34 #2A1866 #3E2498 #532FC9

Accessibility & contrast

On white

14.78
#2A1866 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A1866
14.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1866#FFFFFF#000000##FFFFFF
##2A18661.0014.781.4214.78
#FFFFFF14.781.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A68
Deuteranopia (green-blind)
#002565
Tritanopia (blue-blind)
#0F2D3D
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2a1866;
/* rgb */ color: rgb(42, 24, 102);
/* oklch */ color: oklch(29.0% 0.128 285.9);
Tailwind
colors: {
  custom: {
    50: '#6b5792',
    500: '#2a1866',
    950: '#000000',
  },
}
SCSS
$custom: #2a1866;
$custom-light: #6b5792;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1866",
  "rgb": {
    "r": 42,
    "g": 24,
    "b": 102
  },
  "hsl": {
    "h": 253.846,
    "s": 61.905,
    "l": 24.706
  },
  "oklch": {
    "l": 0.28977,
    "c": 0.12775,
    "h": 285.9
  },
  "luminance": 0.02105
}

Semantic roles & 50–950 ramp

primary
#2A1866
secondary
#869C3E
accent
#E543C0
background
#F6F5F9
surface
#ECE9F1
border
#C7C5CB
text
#07030D
muted
#7A787E

Preview Lab

Preview with #2A1866

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

Preview Lab → · Contrast checker → · Palette generator →

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