Skip to content
IndexRequest a UIAboutContact

HSL Colour Picker Sliders

Three sliders for hue, saturation and lightness whose tracks show the colours you will get, with hex, RGB and contrast.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI IMAGE OR VIDEO TOOL
Clean UI mockup of a colour picker panel with a large rounded swatch on top, three horizontal sliders labelled Hue, Saturation and Lightness whose tracks show a rainbow, a grey to colour ramp and a dark to light ramp with round handles, beside it hex and RGB values and two small badges White text 4.8 Pass and Black text 4.4 Fail, light theme, flat modern style. Negative: heavy shadows, clutter, text errors, device frames. Reduced motion: static design.

About this pattern

Definition

HSL describes a colour the way people think about it: which hue, how vivid, how light. Sliders whose tracks show the resulting colour make adjusting predictable. Showing hex, RGB and the contrast ratio against white and black lets designers pick a colour and know whether text on it is readable.

When to use it

  • Paint each slider track with a gradient that shows what moving that slider does while the other two stay fixed.
  • Convert HSL to RGB and hex; show all three.
  • Compute contrast with relative luminance and show the ratio for white and black text.
  • Mark ratios below 4.5 as failing for normal text.

What the controls do

  • Hue, saturation and lightness sliders and a result card.

Motion & timing

  • Updates are immediate.
  • Reduced motion: nothing animates.

Tips & variations

  • Label the sliders and expose current values as text.
  • Do not rely on colour alone to show pass or fail.

Code of this live preview

HTML
<div class="bx"><div class="sw2" id="sw2"><b id="hx"></b><span id="cr"></span></div><label class="rw">Hue <b id="hv"></b><input class="sl" id="h" type="range" min="0" max="360" value="220"></label><label class="rw">Saturation <b id="sv"></b><input class="sl" id="s" type="range" min="0" max="100" value="70"></label><label class="rw">Lightness <b id="lv"></b><input class="sl" id="l" type="range" min="0" max="100" value="50"></label></div>

Related patterns

Contrast Ratio Checker

↗
Contrast Ratio CheckerColour Techniques

Colour Harmony Wheel

↗
Colour Harmony WheelPalettes by Concept

Tint, Shade & Tone Ramps

↗
Tint, Shade & Tone RampsColour Techniques