#040731#040731

#040731 is a very dark, moderate blue. Relative luminance 0.004; OKLCH L 16.6% C 0.082 H 269.4°. Best body text is #FFFFFF at 19.44:1 contrast (WCAG AA passes).

Color values

HEX#040731
RGBrgb(4, 7, 49)
HSLhsl(236, 85%, 10%)
HSVhsv(236, 92%, 19%)
CMYKcmyk(91.8%, 85.7%, 0%, 80.8%)
CIE-LABlab(3.61, 12.31, -26.24)
CIE-LCHlch(3.61, 28.98, 295.14°)
OKLaboklab(16.57% -0.0008 -0.082)
OKLCHoklch(16.57% 0.082 269.4)
XYZxyz(0.6802, 0.3994, 2.9464)
Luminance0.0040 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040731 #312E04
analogous
#041D31 #040731 #170431
triadic
#040731 #310407 #073104
tetradic
#040731 #31041D #312E04 #043117
square
#040731 #31041D #312E04 #043117
split-complementary
#040731 #311704 #1D3104
monochromatic
#02041C #02041C #040731 #090F6A #0D17A2

Accessibility & contrast

On white

19.44
#040731 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.08
#040731 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040731
19.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040731#FFFFFF#000000##FFFFFF
##0407311.0019.441.0819.44
#FFFFFF19.441.0021.001.00
#0000001.0821.001.0021.00
##FFFFFF19.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000F32
Deuteranopia (green-blind)
#000B30
Tritanopia (blue-blind)
#00131B
Achromatopsia (no color)
#0D0D0D

Design tokens & code

CSS
--color: #040731;
/* rgb */ color: rgb(4, 7, 49);
/* oklch */ color: oklch(16.6% 0.082 269.4);
Tailwind
colors: {
  custom: {
    50: '#4b4969',
    500: '#040731',
    950: '#000000',
  },
}
SCSS
$custom: #040731;
$custom-light: #4b4969;
$custom-dark: #000000;
JSON
{
  "hex": "#040731",
  "rgb": {
    "r": 4,
    "g": 7,
    "b": 49
  },
  "hsl": {
    "h": 236,
    "s": 84.906,
    "l": 10.392
  },
  "oklch": {
    "l": 0.1657,
    "c": 0.08201,
    "h": 269.4
  },
  "luminance": 0.004
}

Semantic roles & 50–950 ramp

primary
#040731
secondary
#736E1D
accent
#ED2DFB
background
#F4F4F6
surface
#E7E6EB
border
#C3C2C6
text
#010006
muted
#77777A

Preview Lab

Preview with #040731

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

Preview Lab → · Contrast checker → · Palette generator →

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