#040308#040308

#040308 is a very dark, near-neutral violet. Relative luminance 0.001; OKLCH L 10.4% C 0.017 H 294.8°. Best body text is #FFFFFF at 20.56:1 contrast (WCAG AA passes).

Color values

HEX#040308
RGBrgb(4, 3, 8)
HSLhsl(252, 45%, 2%)
HSVhsv(252, 63%, 3%)
CMYKcmyk(50%, 62.5%, 0%, 96.9%)
CIE-LABlab(0.98, 0.96, -1.80)
CIE-LCHlch(0.98, 2.04, 298.01°)
OKLaboklab(10.42% 0.0072 -0.0156)
OKLCHoklch(10.42% 0.017 294.8)
XYZxyz(0.1265, 0.1085, 0.2440)
Luminance0.0011 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040308 #070803
analogous
#030508 #040308 #070308
triadic
#040308 #080403 #030804
tetradic
#040308 #080305 #070803 #030807
square
#040308 #080305 #070803 #030807
split-complementary
#040308 #080703 #050803
monochromatic
#0B0816 #0B0816 #0B0816 #1A1435 #312461

Accessibility & contrast

On white

20.56
#040308 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.02
#040308 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040308
20.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040308#FFFFFF#000000##FFFFFF
##0403081.0020.561.0220.56
#FFFFFF20.561.0021.001.00
#0000001.0221.001.0021.00
##FFFFFF20.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#020408
Deuteranopia (green-blind)
#020408
Tritanopia (blue-blind)
#030405
Achromatopsia (no color)
#040404

Design tokens & code

CSS
--color: #040308;
/* rgb */ color: rgb(4, 3, 8);
/* oklch */ color: oklch(10.4% 0.017 294.8);
Tailwind
colors: {
  custom: {
    50: '#48484a',
    500: '#040308',
    950: '#000000',
  },
}
SCSS
$custom: #040308;
$custom-light: #48484a;
$custom-dark: #000000;
JSON
{
  "hex": "#040308",
  "rgb": {
    "r": 4,
    "g": 3,
    "b": 8
  },
  "hsl": {
    "h": 252,
    "s": 45.455,
    "l": 2.157
  },
  "oklch": {
    "l": 0.10416,
    "c": 0.01723,
    "h": 294.8
  },
  "luminance": 0.00108
}

Semantic roles & 50–950 ramp

primary
#040308
secondary
#3D4423
accent
#D553BB
background
#F4F4F4
surface
#E6E6E7
border
#C2C2C3
text
#000001
muted
#777777

Preview Lab

Preview with #040308

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

Preview Lab → · Contrast checker → · Palette generator →

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