#2A187F#2A187F

#2A187F is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.7% C 0.160 H 280.1°. Best body text is #FFFFFF at 13.68:1 contrast (WCAG AA passes).

Color values

HEX#2A187F
RGBrgb(42, 24, 127)
HSLhsl(250, 68%, 30%)
HSVhsv(250, 81%, 50%)
CMYKcmyk(66.9%, 81.1%, 0%, 50.2%)
CIE-LABlab(18.70, 39.14, -54.46)
CIE-LCHlch(18.70, 67.07, 305.70°)
OKLaboklab(31.66% 0.0281 -0.1572)
OKLCHoklch(31.66% 0.16 280.1)
XYZxyz(5.1110, 2.6774, 20.3220)
Luminance0.0268 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A187F #6D7F18
analogous
#183A7F #2A187F #5D187F
triadic
#2A187F #7F2A18 #187F2A
tetradic
#2A187F #7F183A #6D7F18 #187F5D
square
#2A187F #7F183A #6D7F18 #187F5D
split-complementary
#2A187F #7F5D18 #3A7F18
monochromatic
#09051A #190E4C #2A187F #3B22B2 #5438D9

Accessibility & contrast

On white

13.68
#2A187F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#2A187F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A187F
13.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A187F#FFFFFF#000000##FFFFFF
##2A187F1.0013.681.5413.68
#FFFFFF13.681.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003182
Deuteranopia (green-blind)
#002A7D
Tritanopia (blue-blind)
#00374B
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2a187f;
/* rgb */ color: rgb(42, 24, 127);
/* oklch */ color: oklch(31.7% 0.160 280.1);
Tailwind
colors: {
  custom: {
    50: '#7158a5',
    500: '#2a187f',
    950: '#000000',
  },
}
SCSS
$custom: #2a187f;
$custom-light: #7158a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2a187f",
  "rgb": {
    "r": 42,
    "g": 24,
    "b": 127
  },
  "hsl": {
    "h": 250.485,
    "s": 68.212,
    "l": 29.608
  },
  "oklch": {
    "l": 0.31662,
    "c": 0.15971,
    "h": 280.1
  },
  "luminance": 0.02678
}

Semantic roles & 50–950 ramp

primary
#2A187F
secondary
#9FB33F
accent
#EB3DCD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A187F

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

Preview Lab → · Contrast checker → · Palette generator →

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