#2A127F#2A127F

#2A127F is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.0% C 0.165 H 280.9°. Best body text is #FFFFFF at 14.08:1 contrast (WCAG AA passes).

Color values

HEX#2A127F
RGBrgb(42, 18, 127)
HSLhsl(253, 75%, 28%)
HSVhsv(253, 86%, 50%)
CMYKcmyk(66.9%, 85.8%, 0%, 50.2%)
CIE-LABlab(17.72, 42.00, -56.09)
CIE-LCHlch(17.72, 70.07, 306.83°)
OKLaboklab(30.98% 0.0312 -0.1619)
OKLCHoklch(30.98% 0.165 280.9)
XYZxyz(5.0007, 2.4568, 20.2852)
Luminance0.0246 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A127F #677F12
analogous
#12307F #2A127F #60127F
triadic
#2A127F #7F2A12 #127F2A
tetradic
#2A127F #7F1230 #677F12 #127F60
square
#2A127F #7F1230 #677F12 #127F60
split-complementary
#2A127F #7F6012 #307F12
monochromatic
#09041B #180A49 #2A127F #3C1AB5 #532BE1

Accessibility & contrast

On white

14.08
#2A127F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#2A127F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A127F
14.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A127F#FFFFFF#000000##FFFFFF
##2A127F1.0014.081.4914.08
#FFFFFF14.081.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F82
Deuteranopia (green-blind)
#00277D
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2a127f;
/* rgb */ color: rgb(42, 18, 127);
/* oklch */ color: oklch(31.0% 0.165 280.9);
Tailwind
colors: {
  custom: {
    50: '#7155a5',
    500: '#2a127f',
    950: '#000000',
  },
}
SCSS
$custom: #2a127f;
$custom-light: #7155a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2a127f",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 127
  },
  "hsl": {
    "h": 253.211,
    "s": 75.172,
    "l": 28.431
  },
  "oklch": {
    "l": 0.30983,
    "c": 0.16484,
    "h": 280.9
  },
  "luminance": 0.02457
}

Semantic roles & 50–950 ramp

primary
#2A127F
secondary
#99B538
accent
#F236C8
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A127F

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

Preview Lab → · Contrast checker → · Palette generator →

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