Buscar herramientas...

Buscar herramientas...

Convertidor HSL a RGB

Convertir valores de color HSL a formato RGB

rgb(60, 131, 246)
#3C83F6

How Convertidor HSL a RGB Works

An HSL to RGB Converter is a color transformation utility used to translate colors from the intuitive HSL (Hue, Saturation, Lightness) model into the hardware-ready RGB (Red, Green, Blue) format. This tool is a bridge between Designers and Developers translating artistic intent into technical implementation.

The conversion engine uses a precise geometric algorithm:

  1. Cylindrical to Cartesian Mapping: HSL is a cylindrical coordinate system (Hue is degrees, S/L are percentages). RGB is a cubic coordinate system.
  2. Chroma Calculation: The engine first calculates the "Chroma" (C), which represents the intensity of the color based on Lightness and Saturation.
  3. Hue Sectoring: The Hue circle (0-360°) is divided into 6 sectors (Red-Yellow, Yellow-Green, etc.). The algorithm determines which sector the color falls into.
  4. Intermediate Values: It calculates intermediate values ($X$) to transition smoothly between primary colors.
  5. Baseline Adjustment: Finally, it adds a lightness match value ($m$) to shift the color to the correct brightness level, resulting in the final R, G, and B integers (0-255).

The History of HSL

Created in the 1970s by computer graphics researchers, HSL was designed to be more "user-friendly" than RGB.

  • RGB: "How much Red light do I add?" (Hard for humans to guess).
  • HSL: "What color is it (Hue)? How vivid is it (Saturation)? How bright is it (Lightness)?" (Intuitive).

Technical Comparison: HSL vs HSB (HSV)

They are often confused but are DIFFERENT.

  • HSL (Lightness): 100% Lightness is ALWAYS White.
  • HSB (Brightness): 100% Brightness is the "Pure" color. To get white, you must also have 0% Saturation.
  • CSS Standard: The web uses HSL. Using HSB values in CSS will result in wrong colors.

Common HSL Values

Color Hue (Deg) Saturation Lightness
Red 100% 50%
Green 120° 100% 50%
Blue 240° 100% 50%
White Any Any 100%
Black Any Any 0%
Gray Any 0% 50%

Frequently Asked Questions

RGB is for screens (mixing light). HSL is for humans (mixing paint). HSL makes it easier to create color palettes because you can just change the 'Hue' to rotate colors while keeping the brightness the same.

Herramientas relacionadas