#2A187B#2A187B

#2A187B is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.2% C 0.155 H 280.9°. Best body text is #FFFFFF at 13.86:1 contrast (WCAG AA passes).

Color values

HEX#2A187B
RGBrgb(42, 24, 123)
HSLhsl(251, 67%, 29%)
HSVhsv(251, 80%, 48%)
CMYKcmyk(65.9%, 80.5%, 0%, 51.8%)
CIE-LABlab(18.26, 37.87, -52.65)
CIE-LCHlch(18.26, 64.86, 305.73°)
OKLaboklab(31.22% 0.0292 -0.1519)
OKLCHoklch(31.22% 0.155 280.9)
XYZxyz(4.8555, 2.5752, 18.9762)
Luminance0.0258 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A187B #697B18
analogous
#18387B #2A187B #5C187B
triadic
#2A187B #7B2A18 #187B2A
tetradic
#2A187B #7B1838 #697B18 #187B5C
square
#2A187B #7B1838 #697B18 #187B5C
split-complementary
#2A187B #7B5C18 #387B18
monochromatic
#09051A #190E48 #2A187B #3B22AE #5336D8

Accessibility & contrast

On white

13.86
#2A187B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2A187B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A187B
13.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A187B#FFFFFF#000000##FFFFFF
##2A187B1.0013.861.5213.86
#FFFFFF13.861.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307E
Deuteranopia (green-blind)
#002979
Tritanopia (blue-blind)
#003549
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2a187b;
/* rgb */ color: rgb(42, 24, 123);
/* oklch */ color: oklch(31.2% 0.155 280.9);
Tailwind
colors: {
  custom: {
    50: '#7058a2',
    500: '#2a187b',
    950: '#000000',
  },
}
SCSS
$custom: #2a187b;
$custom-light: #7058a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2a187b",
  "rgb": {
    "r": 42,
    "g": 24,
    "b": 123
  },
  "hsl": {
    "h": 250.909,
    "s": 67.347,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31217,
    "c": 0.15474,
    "h": 280.9
  },
  "luminance": 0.02576
}

Semantic roles & 50–950 ramp

primary
#2A187B
secondary
#9BB03F
accent
#EA3ECB
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #2A187B

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

Preview Lab → · Contrast checker → · Palette generator →

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