Midnight to RGB — 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 RGB code for midnight?

The CSS color midnight in RGB format is rgb(3, 1, 45). 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: rgb(3, 1, 45);
  • Background: background-color: rgb(3, 1, 45);
  • Border: border-color: rgb(3, 1, 45);

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

Select midnight from the color name list in our color converter. The RGB value — rgb(3, 1, 45) — 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 RGB used for?

RGB defines colors using three values from 0 to 255 — red, green and blue intensity. It is the native format for screens, monitors and web browsers.