#28127E#28127E

#28127E is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.7% C 0.164 H 279.9°. Best body text is #FFFFFF at 14.21:1 contrast (WCAG AA passes).

Color values

HEX#28127E
RGBrgb(40, 18, 126)
HSLhsl(252, 75%, 28%)
HSVhsv(252, 86%, 49%)
CMYKcmyk(68.3%, 85.7%, 0%, 50.6%)
CIE-LABlab(17.41, 41.51, -55.97)
CIE-LCHlch(17.41, 69.68, 306.57°)
OKLaboklab(30.69% 0.0283 -0.1616)
OKLCHoklch(30.69% 0.164 279.9)
XYZxyz(4.8561, 2.3897, 19.9400)
Luminance0.0239 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#28127E #687E12
analogous
#12327E #28127E #5E127E
triadic
#28127E #7E2812 #127E28
tetradic
#28127E #7E1232 #687E12 #127E5E
square
#28127E #7E1232 #687E12 #127E5E
split-complementary
#28127E #7E5E12 #327E12
monochromatic
#08041B #170A48 #28127E #391AB4 #4F2AE1

Accessibility & contrast

On white

14.21
#28127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#28127E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #28127E
14.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##28127E#FFFFFF#000000##FFFFFF
##28127E1.0014.211.4814.21
#FFFFFF14.211.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F81
Deuteranopia (green-blind)
#00277C
Tritanopia (blue-blind)
#00344A
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #28127e;
/* rgb */ color: rgb(40, 18, 126);
/* oklch */ color: oklch(30.7% 0.164 279.9);
Tailwind
colors: {
  custom: {
    50: '#7055a5',
    500: '#28127e',
    950: '#000000',
  },
}
SCSS
$custom: #28127e;
$custom-light: #7055a5;
$custom-dark: #000000;
JSON
{
  "hex": "#28127e",
  "rgb": {
    "r": 40,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 252.222,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.30688,
    "c": 0.16404,
    "h": 279.9
  },
  "luminance": 0.0239
}

Semantic roles & 50–950 ramp

primary
#28127E
secondary
#9BB438
accent
#F236CB
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #28127E

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

Preview Lab → · Contrast checker → · Palette generator →

#28127E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva