Random Color Generator

#040ea1 Color

Color Codes
Hex Code #040ea1
RGB Code rgb(04, 14, 161)
HSL Code hsl(236, 95%, 32%)

#040ea1 Color Syntax

rgb()

 rgb(Red, Green, Blue);
 rgba(Red, Green, Blue, Alpha);

 main {
    background-color: rgb(04, 14, 161);
   }

R(red), G(green), B(blue) can be number between 0-255.
A parameter is a hex characters (0–9, A–F) and optional.

hsl()

 hsl(hue saturation lightness);
 hsl(hue saturation lightness / alpha);

 div {
  background-color: hsl(236, 95%, 32%);
  }

Saturation value is a percentage value between 0% unsaturated and 100% fully saturated.
Lightness value is a percentage value between 100% is white and 0% is black.

Lighter and darker colors of #040ea1

RGB Code Hex Code Preview
rgb(04, 14, 161, 10%) #040ea11a  
rgb(04, 14, 161, 20%) #040ea133  
rgb(04, 14, 161, 40%) #040ea14C  
rgb(04, 14, 161, 60%) #040ea199  
rgb(04, 14, 161, 80%) #040ea1CC  
rgb(04, 14, 161, 100%) #040ea1FF  

Saturated and desaturated colors of #040ea1

HSL Code Preview
hsl(236, 10%, 32%)  
hsl(236, 20%, 32%)  
hsl(236, 40%, 32%)  
hsl(236, 60%, 32%)  
hsl(236, 80%, 32%)  
hsl(236, 100%, 32%)  

#040ea1 Color Usage In CSS

 body {
    color: #040ea1;
    }
 p {
    color: rgb(04, 14, 161);
    }
 header {
    border-bottom:1px solid #040ea1;
    }
Recent Random Colors