#402267#402267

#402267 is a dark, moderate violet. Relative luminance 0.032; OKLCH L 33.1% C 0.116 H 300.1°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).

Color values

HEX#402267
RGBrgb(64, 34, 103)
HSLhsl(266, 50%, 27%)
HSVhsv(266, 67%, 40%)
CMYKcmyk(37.9%, 67%, 0%, 59.6%)
CIE-LABlab(20.88, 30.05, -35.35)
CIE-LCHlch(20.88, 46.39, 310.36°)
OKLaboklab(33.09% 0.0582 -0.1005)
OKLCHoklch(33.09% 0.116 300.1)
XYZxyz(5.1340, 3.2133, 13.1791)
Luminance0.0321 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402267 #496722
analogous
#222767 #402267 #632267
triadic
#402267 #674022 #226740
tetradic
#402267 #672227 #496722 #226763
square
#402267 #672227 #496722 #226763
split-complementary
#402267 #676322 #276722
monochromatic
#0E0817 #231339 #402267 #5D3195 #7943C1

Accessibility & contrast

On white

12.78
#402267 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#402267 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402267
12.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402267#FFFFFF#000000##FFFFFF
##4022671.0012.781.6412.78
#FFFFFF12.781.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003269
Deuteranopia (green-blind)
#063265
Tritanopia (blue-blind)
#383141
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #402267;
/* rgb */ color: rgb(64, 34, 103);
/* oklch */ color: oklch(33.1% 0.116 300.1);
Tailwind
colors: {
  custom: {
    50: '#785f93',
    500: '#402267',
    950: '#000000',
  },
}
SCSS
$custom: #402267;
$custom-light: #785f93;
$custom-dark: #000000;
JSON
{
  "hex": "#402267",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 103
  },
  "hsl": {
    "h": 266.087,
    "s": 50.365,
    "l": 26.863
  },
  "oklch": {
    "l": 0.3309,
    "c": 0.11613,
    "h": 300.1
  },
  "luminance": 0.03213
}

Semantic roles & 50–950 ramp

primary
#402267
secondary
#789B4A
accent
#DA4E9D
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#09040D
muted
#7B797E

Preview Lab

Preview with #402267

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

Preview Lab → · Contrast checker → · Palette generator →

#402267 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva