#28128A#28128A

#28128A is a dark, vivid violet. Relative luminance 0.027; OKLCH L 32.1% C 0.178 H 277.8°. Best body text is #FFFFFF at 13.60:1 contrast (WCAG AA passes).

Color values

HEX#28128A
RGBrgb(40, 18, 138)
HSLhsl(251, 77%, 31%)
HSVhsv(251, 87%, 54%)
CMYKcmyk(71%, 87%, 0%, 45.9%)
CIE-LABlab(18.88, 45.11, -61.12)
CIE-LCHlch(18.88, 75.97, 306.43°)
OKLaboklab(32.12% 0.0241 -0.1765)
OKLCHoklch(32.12% 0.178 277.8)
XYZxyz(5.6773, 2.7182, 24.2653)
Luminance0.0272 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#28128A #748A12
analogous
#12388A #28128A #64128A
triadic
#28128A #8A2812 #128A28
tetradic
#28128A #8A1238 #748A12 #128A64
square
#28128A #8A1238 #748A12 #128A64
split-complementary
#28128A #8A6412 #388A12
monochromatic
#09041E #180B54 #28128A #3819C0 #5332E4

Accessibility & contrast

On white

13.60
#28128A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#28128A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #28128A
13.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##28128A#FFFFFF#000000##FFFFFF
##28128A1.0013.601.5413.60
#FFFFFF13.601.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00328D
Deuteranopia (green-blind)
#002988
Tritanopia (blue-blind)
#003951
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #28128a;
/* rgb */ color: rgb(40, 18, 138);
/* oklch */ color: oklch(32.1% 0.178 277.8);
Tailwind
colors: {
  custom: {
    50: '#7356ad',
    500: '#28128a',
    950: '#000000',
  },
}
SCSS
$custom: #28128a;
$custom-light: #7356ad;
$custom-dark: #000000;
JSON
{
  "hex": "#28128a",
  "rgb": {
    "r": 40,
    "g": 18,
    "b": 138
  },
  "hsl": {
    "h": 251,
    "s": 76.923,
    "l": 30.588
  },
  "oklch": {
    "l": 0.32119,
    "c": 0.17818,
    "h": 277.8
  },
  "luminance": 0.02719
}

Semantic roles & 50–950 ramp

primary
#28128A
secondary
#A6BF39
accent
#F334D0
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #28128A

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

Preview Lab → · Contrast checker → · Palette generator →

#28128A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva