#040F6F

#040f6f ≈ Midnight Blue

  • blue
  • Lightness: low
  • Saturation: moderate
  • Cool

#040f6f is a color from the blue family, with low lightness and moderate saturation. In the RGB model it is made of 1.57% red, 5.88% green and 43.53% blue; printed in CMYK it uses 96.4% cyan, 86.49% magenta, 0% yellow and 56.47% black. Its hue angle is 233.83°, with 93.04% saturation and 22.55% lightness in HSL. It is a cool color, often associated with trust, stability and focus. Designers typically use it for technology products, finance and banking and luxury branding. White text on this color reaches a contrast ratio of 16.12:1 (WCAG AAA). The closest named color is Midnight Blue (#191970), ΔE 2.58.

Description generated from the measured properties of this color.

Conversions of #040f6f into other color spaces
HEX
RGB
RGB percent
CMY
CMYK
HSL
HSV / HSB
Web safe#000066
CIE-LAB
XYZ
xyY
CIE-LCH
CIE-LUV
Hunter-Lab
OKLab
Binary
Decimal
Relative luminance0.0152

Readable text 16.12:1 AA ✓ AA Large ✓ AAA ✓ AAA Large ✓
Readable text 1.3:1 AA ✕ AA Large ✕ AAA ✕ AAA Large ✕

Achromatopsia #212121 ≈ 0.003% of males
Achromatomaly #191b4c ≈ 0.001% of males
Protanopia #002672 ≈ 1.01% of males
Deuteranopia #001b6d ≈ 1.27% of males
Tritanopia #002e40 ≈ 0.0001% of males
Protanomaly #001f71 ≈ 1.08% of males
Deuteranomaly #00176e ≈ 4.63% of males
Tritanomaly #002557 ≈ 0.0002% of males
Simulate on your own image

Text in this color

Background in this color

Border in this color

Text color
.text-040f6f {
  color: #040f6f;
}
Background
.bg-040f6f {
  background-color: #040f6f;
  color: #ffffff;
}
Border
.border-040f6f {
  border: 2px solid #040f6f;
}
CSS variables
:root {
  --color-primary: #040f6f;
  --color-primary-rgb: 4 15 111;
  --color-primary-hsl: 234 93% 23%;
}
Gradient
.gradient-040f6f {
  background: linear-gradient(135deg, #040f6f, #2e046f);
}
Colored shadow
.shadow-040f6f {
  box-shadow: 0 8px 24px rgb(4 15 111 / 0.35);
}

Midnight Blue
#040f6f  rgb(4, 15, 111)  hsl(234, 93%, 23%)  Midnight Blue
#6f6404  rgb(111, 100, 4)  hsl(54, 93%, 23%)  Field Drab
#6f040f  rgb(111, 4, 15)  hsl(354, 93%, 23%)  Rosewood
#0f6f04  rgb(15, 111, 4)  hsl(114, 93%, 23%)  Pakistan Green