#040231#040231

#040231 is a very dark, moderate blue. Relative luminance 0.003; OKLCH L 15.3% C 0.091 H 271.3°. Best body text is #FFFFFF at 19.85:1 contrast (WCAG AA passes).

Color values

HEX#040231
RGBrgb(4, 2, 49)
HSLhsl(243, 92%, 10%)
HSVhsv(243, 96%, 19%)
CMYKcmyk(91.8%, 95.9%, 0%, 80.8%)
CIE-LABlab(2.63, 14.32, -27.80)
CIE-LCHlch(2.63, 31.27, 297.24°)
OKLaboklab(15.28% 0.0021 -0.0907)
OKLCHoklch(15.28% 0.091 271.3)
XYZxyz(0.6260, 0.2909, 2.9283)
Luminance0.0029 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040231 #2F3102
analogous
#021831 #040231 #1B0231
triadic
#040231 #310402 #023104
tetradic
#040231 #310218 #2F3102 #02311B
square
#040231 #310218 #2F3102 #02311B
split-complementary
#040231 #311B02 #183102
monochromatic
#02011D #02011D #040231 #09046C #0E07A7

Accessibility & contrast

On white

19.85
#040231 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.06
#040231 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040231
19.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040231#FFFFFF#000000##FFFFFF
##0402311.0019.851.0619.85
#FFFFFF19.851.0021.001.00
#0000001.0621.001.0021.00
##FFFFFF19.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000C32
Deuteranopia (green-blind)
#000730
Tritanopia (blue-blind)
#001019
Achromatopsia (no color)
#0A0A0A

Design tokens & code

CSS
--color: #040231;
/* rgb */ color: rgb(4, 2, 49);
/* oklch */ color: oklch(15.3% 0.091 271.3);
Tailwind
colors: {
  custom: {
    50: '#4a4769',
    500: '#040231',
    950: '#000000',
  },
}
SCSS
$custom: #040231;
$custom-light: #4a4769;
$custom-dark: #000000;
JSON
{
  "hex": "#040231",
  "rgb": {
    "r": 4,
    "g": 2,
    "b": 49
  },
  "hsl": {
    "h": 242.553,
    "s": 92.157,
    "l": 10
  },
  "oklch": {
    "l": 0.15276,
    "c": 0.09075,
    "h": 271.3
  },
  "luminance": 0.00291
}

Semantic roles & 50–950 ramp

primary
#040231
secondary
#727519
accent
#FF29F6
background
#F4F3F6
surface
#E7E5EB
border
#C3C1C6
text
#010006
muted
#77777A

Preview Lab

Preview with #040231

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

Preview Lab → · Contrast checker → · Palette generator →

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