Midnight to HSL

Color Code

#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 HSL code for midnight?

The CSS color midnight in HSL format is hsl(242.7, 95.7%, 9%). 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: hsl(242.7, 95.7%, 9%);
  • Background: background-color: hsl(242.7, 95.7%, 9%);
  • Border: border-color: hsl(242.7, 95.7%, 9%);

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 HSL?

Select midnight from the color name list in our color converter. The HSL value — hsl(242.7, 95.7%, 9%) — 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 HSL used for?

HSL describes colors by hue (0–360°), saturation (0–100%) and lightness (0–100%). It is more intuitive for designers — easy to create lighter, darker or less saturated variants of any color.