#9d2afa Color
Color Codes | |
---|---|
Hex Code | #9d2afa |
RGB Code | rgb(157, 42, 250) |
HSL Code | hsl(273, 95%, 57%) |
#9d2afa Color Syntax
rgb()
rgb(Red, Green, Blue); rgba(Red, Green, Blue, Alpha); main { background-color: rgb(157, 42, 250); }
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(273, 95%, 57%); }
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 #9d2afa
RGB Code | Hex Code | Preview |
---|---|---|
rgb(157, 42, 250, 10%) | #9d2afa1a | |
rgb(157, 42, 250, 20%) | #9d2afa33 | |
rgb(157, 42, 250, 40%) | #9d2afa4C | |
rgb(157, 42, 250, 60%) | #9d2afa99 | |
rgb(157, 42, 250, 80%) | #9d2afaCC | |
rgb(157, 42, 250, 100%) | #9d2afaFF |
Saturated and desaturated colors of #9d2afa
HSL Code | Preview |
---|---|
hsl(273, 10%, 57%) | |
hsl(273, 20%, 57%) | |
hsl(273, 40%, 57%) | |
hsl(273, 60%, 57%) | |
hsl(273, 80%, 57%) | |
hsl(273, 100%, 57%) |
#9d2afa Color Usage In CSS
body { color: #9d2afa; } p { color: rgb(157, 42, 250); } header { border-bottom:1px solid #9d2afa; }