#2A187E#2A187E

#2A187E is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.6% C 0.158 H 280.3°. Best body text is #FFFFFF at 13.72:1 contrast (WCAG AA passes).

Color values

HEX#2A187E
RGBrgb(42, 24, 126)
HSLhsl(251, 68%, 29%)
HSVhsv(251, 81%, 49%)
CMYKcmyk(66.7%, 81%, 0%, 50.6%)
CIE-LABlab(18.59, 38.83, -54.01)
CIE-LCHlch(18.59, 66.52, 305.71°)
OKLaboklab(31.55% 0.0284 -0.1559)
OKLCHoklch(31.55% 0.158 280.3)
XYZxyz(5.0462, 2.6515, 19.9805)
Luminance0.0265 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A187E #6C7E18
analogous
#18397E #2A187E #5D187E
triadic
#2A187E #7E2A18 #187E2A
tetradic
#2A187E #7E1839 #6C7E18 #187E5D
square
#2A187E #7E1839 #6C7E18 #187E5D
split-complementary
#2A187E #7E5D18 #397E18
monochromatic
#09051A #190E4B #2A187E #3B22B1 #5437D9

Accessibility & contrast

On white

13.72
#2A187E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#2A187E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A187E
13.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A187E#FFFFFF#000000##FFFFFF
##2A187E1.0013.721.5313.72
#FFFFFF13.721.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003181
Deuteranopia (green-blind)
#00297C
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2a187e;
/* rgb */ color: rgb(42, 24, 126);
/* oklch */ color: oklch(31.6% 0.158 280.3);
Tailwind
colors: {
  custom: {
    50: '#7058a4',
    500: '#2a187e',
    950: '#000000',
  },
}
SCSS
$custom: #2a187e;
$custom-light: #7058a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2a187e",
  "rgb": {
    "r": 42,
    "g": 24,
    "b": 126
  },
  "hsl": {
    "h": 250.588,
    "s": 68,
    "l": 29.412
  },
  "oklch": {
    "l": 0.3155,
    "c": 0.15847,
    "h": 280.3
  },
  "luminance": 0.02652
}

Semantic roles & 50–950 ramp

primary
#2A187E
secondary
#9EB23F
accent
#EB3DCC
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A187E

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

Preview Lab → · Contrast checker → · Palette generator →

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