values: 0 ~ 360โจ (degrees)
complimentary color: color on the opposite side of the color wheel.
determines how gray looking the color is.
determines how white or black a color is.
50% means no additional white or black added to the color. โญ๏ธ
0 (transparent) ~ 1 (opaque)
.bg {
background-color: hsl(0, 100%, 50%); /* pure red: #FF0000 */
background-color: hsla(0, 100%, 50%, 0.5); /* alpha: 0 ~ 1 */
}
hsl(16, 95%, 58%)
/* โฐ โฏ */
/* drop the lightness value by 10% */
hsl(16, 95%, 48%)
/* โฐ โฏ */
#container {
--lightness-offset: 0%; /* โญ๏ธ define: css var */
background-color: hsl(200, 100%,
calc(50% + var(--lightness-offset)) /* โญ๏ธ variable lightness */
);
display: inline-block;
padding: 4px 8px 4px 12px;
}
#container::before {
content: "hover on meโ๏ธ";
}
/* change "lightness", "content" on hover */
#container:hover {
--lightness-offset: -10%; /* โญ๏ธ 10% darker */
}
#container:hover::before {
content: "10% darkerโ๏ธ";
}