#040236#040236

#040236 is a very dark, moderate blue. Relative luminance 0.003; OKLCH L 16.1% C 0.098 H 270.3°. Best body text is #FFFFFF at 19.68:1 contrast (WCAG AA passes).

Color values

HEX#040236
RGBrgb(4, 2, 54)
HSLhsl(242, 93%, 11%)
HSVhsv(242, 96%, 21%)
CMYKcmyk(92.6%, 96.3%, 0%, 78.8%)
CIE-LABlab(3.03, 17.14, -30.87)
CIE-LCHlch(3.03, 35.31, 299.04°)
OKLaboklab(16.05% 0.0005 -0.0976)
OKLCHoklch(16.05% 0.098 270.3)
XYZxyz(0.7374, 0.3355, 3.5152)
Luminance0.0034 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040236 #343602
analogous
#021A36 #040236 #1E0236
triadic
#040236 #360402 #023604
tetradic
#040236 #36021A #343602 #02361E
square
#040236 #36021A #343602 #02361E
split-complementary
#040236 #361E02 #1A3602
monochromatic
#02011E #02011E #040236 #080471 #0D06AC

Accessibility & contrast

On white

19.68
#040236 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.07
#040236 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040236
19.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040236#FFFFFF#000000##FFFFFF
##0402361.0019.681.0719.68
#FFFFFF19.681.0021.001.00
#0000001.0721.001.0021.00
##FFFFFF19.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000E37
Deuteranopia (green-blind)
#000835
Tritanopia (blue-blind)
#00121C
Achromatopsia (no color)
#0B0B0B

Design tokens & code

CSS
--color: #040236;
/* rgb */ color: rgb(4, 2, 54);
/* oklch */ color: oklch(16.1% 0.098 270.3);
Tailwind
colors: {
  custom: {
    50: '#4c476e',
    500: '#040236',
    950: '#000000',
  },
}
SCSS
$custom: #040236;
$custom-light: #4c476e;
$custom-dark: #000000;
JSON
{
  "hex": "#040236",
  "rgb": {
    "r": 4,
    "g": 2,
    "b": 54
  },
  "hsl": {
    "h": 242.308,
    "s": 92.857,
    "l": 10.98
  },
  "oklch": {
    "l": 0.16052,
    "c": 0.09758,
    "h": 270.3
  },
  "luminance": 0.00336
}

Semantic roles & 50–950 ramp

primary
#040236
secondary
#767A1A
accent
#FF29F7
background
#F4F3F6
surface
#E7E5EC
border
#C3C1C7
text
#020007
muted
#78777A

Preview Lab

Preview with #040236

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

Preview Lab → · Contrast checker → · Palette generator →

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