Instantly convert RGB colors to HSL format for your web projects
RGB (Red, Green, Blue) is an additive color model where colors are created by combining different intensities of red, green, and blue light. Each component ranges from 0 to 255, allowing for over 16 million possible colors.
HSL (Hue, Saturation, Lightness) is a color model that represents colors in a more intuitive way. Hue is the color type (0-360°), saturation is the intensity (0-100%), and lightness determines how light or dark the color is (0-100%).
HSL colors can be used in CSS using the hsl() function:
color: hsl(0, 100%, 50%); /* Pure red */
background-color: hsl(120, 100%, 50%); /* Pure green */
border-color: hsl(240, 100%, 50%); /* Pure blue */You can also use hsla() to add transparency:
color: hsla(0, 100%, 50%, 0.5); /* Semi-transparent red */