HomeConvertersColorHSL to RGB color conversion
Color conversion

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.

Instant result
Result

Enter values to convert.

Inputs
Mode
Formula

Formulas

Core equations used by this converter.

CC = (1 − |2L − 1|) × S
XX = C × (1 − |(H / 60°) mod 2 − 1|)
mm = L − C/2
Formula(R, G, B) = ((R′ + m) × 255, (G′ + m) × 255, (B′ + m) × 255)
isRGB-style 8-bit channels (0–255) unless noted. Calculation runs locally in your browser.

How to use

1

Choose HSL → RGB or RGB → HSL

Use the tabs in the converter to switch direction.

2

Enter HSL or RGB values

Fill in the active fields for the selected direction.

3

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

C = 1, X = 0, m = 0
rgb(255, 0, 0)
ϟ

hsl(120°, 100%, 50%) → RGB

hsl(120°, 100%, 50%) → RGB

→ rgb(0, 255, 0)
rgb(0, 255, 0)
ϟ

hsl(0°, 0%, 75%) → RGB (silver)

hsl(0°, 0%, 75%) → RGB (silver)

C = 0 → all channels equal
rgb(191.25…, …) ≈ (191, 191, 191) or (192, 192, 192) dependi

HSL to RGB color conversion specification

Version 1.1.0 · Engine tested

Calculation status
  • Engine tested 3 published cases
  • Named expert review Not performed
  • Calculation version 1.1.0

Review policy

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.

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.