Midnight Color

HEX, RGB, HSL & CMYK Codes

#03012d
Format Value
HEX #03012d
RGB rgb(3, 1, 45)
HSL hsl(242.7, 95.7%, 9%)
CMYK cmyk(93.3%, 97.8%, 0%, 82.4%)
HSV hsv(242.7, 97.8%, 17.6%)

midnight color harmonies

Tints & shades of midnight

Tints (lighter)

#1a1840 #312f53 #484666 #5f5d79 #76748c #8c8ca0 #a3a3b3 #babac6 #d1d1d9 #e8e8ec

Shades (darker)

#030129 #020125 #020121 #02011d #020119 #010014 #010010 #01000c #010008 #000004

Contrast & accessibility

The quick brown fox

On white · 20.07:1 · AAA

The quick brown fox

On black · 1.05:1 · Fail

Recommended text color: #ffffff

Use midnight in code

CSS color: #03012d;
SCSS $color: #03012d;
Tailwind bg-[#03012d]
Swift UIColor(red: 0.012, green: 0.004, blue: 0.176, alpha: 1)
Android Color.parseColor("#03012d")
Flutter Color(0xFF03012D)

Colors similar to midnight

Browse all Blue colors →

What is the HEX code for midnight?

The CSS color midnight in HEX format is #03012d. Use this value directly in CSS, SVG, and most design tools.

How do I use midnight in CSS?

To apply midnight in CSS:

  • Text color: color: #03012d;
  • Background: background-color: #03012d;
  • Border: border-color: #03012d;

What are all the color format values for midnight?

FormatValue
HEX#03012d
RGBrgb(3, 1, 45)
HSLhsl(242.7, 95.7%, 9%)
CMYKcmyk(93.3%, 97.8%, 0%, 82.4%)

How do I convert midnight to HEX?

Select midnight from the color name list in our color converter. The HEX value — #03012d — appears instantly alongside HEX, RGB, HSL and CMYK.

What color family does midnight belong to?

midnight belongs to the near-black color family. It is a dark, vivid color with HSL values: hue 242.7°, saturation 95.7%, lightness 9%.

How do I create lighter and darker shades of midnight?

Lighter variant (lightness 24%): #080378. Darker variant (lightness 5%): #020119. These values are computed by adjusting HSL lightness ±15% while keeping the same hue and saturation.

What is HEX used for?

HEX color codes are used in CSS, HTML and design tools. They encode red, green and blue as two hexadecimal digits each (00–FF), forming a compact 6-character code like #ff0000.