Turn RGB Into HSL Codes Instantly!

Easily convert RGB to HSL! Simplify your color adjustments with our precise and user-friendly converter.

RGB to Hex

Enter RGB Values


RGB:
rgb(255, 255, 255)
HSL:
hsl(0, 0%, 100%)

What is RGB

RGB stands for Red, Green, Blue, which are the primary colors of light used in digital imaging and displays. The RGB color model combines these three colors (Red, Green and Blue) at varying intensities to produce a broad spectrum of colors. Each of the three color components (Red, Green, Blue) can have an intensity value which range from 0 to 255, where:

  • 0 means no light of that color is emitted (black).
  • 255 means the maximum intensity of that color.

For Instance:

  • RGB(255, 0, 0) represents pure red.
  • RGB(0, 255, 0) represents pure green.
  • RGB(0, 0, 255) represents pure blue.
  • RGB(0, 0, 0) represents pure Black.
  • RGB(255, 255, 255) represents pure White.

What is HSL?

HSL stands for Hue, Saturation, and Lightness. It is a cylindrical-coordinate representation of colors that is more intuitive for humans to understand.

  • Hue: The type of color (e.g., red, blue, yellow) represented as an angle on a color wheel, ranging from 0 to 360 degrees.
  • Saturation: The intensity or purity of the color, ranging from 0% (gray) to 100% (full color).
  • Lightness:The brightness of the color, ranging from 0% (black) to 100% (white).

For example, the HSL representation of a pure red color is (0°, 100%, 50%).

How to Convert RGB to HSL?

The conversion from RGB to HSL involves a series of mathematical steps:

  1. Normalize the RGB values by dividing each by 255.
  2. Find the maximum and minimum values among the normalized RGB components.
  3. Calculate Lightness.
  4. Calculate Saturation.
    • If max = min, Saturation = 0.
    • Otherwise:
  5. Calculate Hue
    • Based on the maximum RGB component, use conditional formulas to find the angle in degrees.

Combine the Hex Values:

Thus, the RGB color (255, 99, 71) converts to the Hex color code #FF6347.

Conversion Example

Let’s convert RGB (255, 0, 0) to HSL:

  1. Normalize RGB:
  2. Maximum = 1, Minimum = 0.
  3. Lightness:
  4. Saturation:
  5. Hue:
  6. Since Red is max:

Result: HSL (0°, 100%, 50%)

Using Our RGB to HSL Converter Tool

Our online RGB to HSL Converter Tool simplifies the process with an intuitive interface. Here’s how to use it:

  1. Input RGB Values: Enter the Red, Green and Blue values in their respective fields.
  2. Click Convert: Hit the Convert to HSL button.
  3. View HSL Output: Instantly see the corresponding HSL values in result section.
  4. Click on the copy icon to copy the HSL Code.

Some Popular RGBs Code

Browse through this collection of modern colors for your next project.