HSL to RGB color conversion
Convert HSL (hue °, saturation %, lightness %) to RGB (0–255). Standard chroma formulas, examples, and color chart. Runs locally in your browser.
Enter values to convert.
Formulas
Core equations used by this converter.
How to use
Choose HSL → RGB or RGB → HSL
Use the tabs in the converter to switch direction.
Enter HSL or RGB values
Fill in the active fields for the selected direction.
Convert and read the result
Use Convert or let the result update automatically.
Example conversions
Common values with formula and result.
hsl(0°, 100%, 50%) → RGB
hsl(0°, 100%, 50%) → RGB
hsl(120°, 100%, 50%) → RGB
hsl(120°, 100%, 50%) → RGB
hsl(0°, 0%, 75%) → RGB (silver)
hsl(0°, 0%, 75%) → RGB (silver)
HSL to RGB color conversion specification
Version 1.1.0 · Engine tested
- Engine tested 3 published cases
- Named expert review Not performed
- Calculation version 1.1.0
- Definition
- **HSL** — hue (0–360°), saturation (0–100%), lightness (0–100%). **RGB** — red, green, blue as integers **0–255**.
- What it calculates
- Convert HSL (hue °, saturation %, lightness %) to RGB (0–255). Standard chroma formulas, examples, and color chart.
- Inputs
- Values required by the selected conversion mode
- Outputs
- Converted result in the target unit or format
- Formula
C = (1 − |2L − 1|) × S · X = C × (1 − |(H / 60°) mod 2 − 1|) · m = L − C/2- HSL to RGB color table
H range (R′, G′, B′) 0° ≤ H < 60° (C, X, 0) 60° ≤ H < 120° (X, C, 0) 120° ≤ H < 180° (0, C, X) 180° ≤ H < 240° (0, X, C) 240° ≤ H < 300° (X, 0, C) 300° ≤ H < 360° (C, 0, X) - Assumptions
- Conversion runs locally in the browser; values are not uploaded.
- Uses the formulas documented on this page.
- Units
- C
- X
- m
- Boundary conditions
- Empty or invalid input yields no valid result.
- Out-of-range values may be rejected by the tool runtime.
- Example
- hsl(0°, 100%, 50%) → RGB → rgb(255, 0, 0)
- Validation cases
- hsl(0°, 100%, 50%) → RGB → rgb(255, 0, 0)
- hsl(120°, 100%, 50%) → RGB → rgb(0, 255, 0)
- hsl(0°, 0%, 75%) → RGB (silver) → rgb(191.25…, …) ≈ (191, 191, 191) or (192, 192, 192) dependi
- Sources
- CalculatorX converter runtime
- Standard unit / encoding definitions where applicable
- Calculation version
- 1.1.0
Background
Interpretation and common distinctions.
Use the converter tabs to switch direction when available. Results for HSL to RGB color conversion update locally in your browser.
Related tools
Frequently asked questions
Key distinctions behind the conversion.
How do you convert using HSL to RGB color conversion?
Use C = (1 − |2L − 1|) × S. Example: hsl(0°, 100%, 50%) → RGB → rgb(255, 0, 0).
Can I switch direction?
Open the related reverse converter listed under Related tools.
Does this run online or locally?
Calculation runs locally in your browser. Values are not uploaded.
How precise are the results?
Results follow the formulas on this page. Round to the precision your use case needs.