#281F52#281F52

#281F52 is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.1% C 0.089 H 287.3°. Best body text is #FFFFFF at 14.91:1 contrast (WCAG AA passes).

Color values

HEX#281F52
RGBrgb(40, 31, 82)
HSLhsl(251, 45%, 22%)
HSVhsv(251, 62%, 32%)
CMYKcmyk(51.2%, 62.2%, 0%, 67.8%)
CIE-LABlab(15.70, 19.39, -29.89)
CIE-LCHlch(15.70, 35.63, 302.98°)
OKLaboklab(28.13% 0.0266 -0.0853)
OKLCHoklch(28.13% 0.089 287.3)
XYZxyz(2.8876, 2.0402, 8.2226)
Luminance0.0204 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#281F52 #49521F
analogous
#1F3052 #281F52 #421F52
triadic
#281F52 #52281F #1F5228
tetradic
#281F52 #521F30 #49521F #1F5242
square
#281F52 #521F30 #49521F #1F5242
split-complementary
#281F52 #52421F #30521F
monochromatic
#0B0816 #120E26 #281F52 #3E307E #5341AB

Accessibility & contrast

On white

14.91
#281F52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#281F52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #281F52
14.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##281F52#FFFFFF#000000##FFFFFF
##281F521.0014.911.4114.91
#FFFFFF14.911.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#012854
Deuteranopia (green-blind)
#012651
Tritanopia (blue-blind)
#1A2A35
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #281f52;
/* rgb */ color: rgb(40, 31, 82);
/* oklch */ color: oklch(28.1% 0.089 287.3);
Tailwind
colors: {
  custom: {
    50: '#665b83',
    500: '#281f52',
    950: '#000000',
  },
}
SCSS
$custom: #281f52;
$custom-light: #665b83;
$custom-dark: #000000;
JSON
{
  "hex": "#281f52",
  "rgb": {
    "r": 40,
    "g": 31,
    "b": 82
  },
  "hsl": {
    "h": 250.588,
    "s": 45.133,
    "l": 22.157
  },
  "oklch": {
    "l": 0.28127,
    "c": 0.08935,
    "h": 287.3
  },
  "luminance": 0.0204
}

Semantic roles & 50–950 ramp

primary
#281F52
secondary
#7B8746
accent
#D553BE
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#06040A
muted
#7A797C

Preview Lab

Preview with #281F52

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

Preview Lab → · Contrast checker → · Palette generator →

#281F52 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva