Close Menu
JustwebworldJustwebworld
  • People
  • Sports
  • Culture
  • Lifestyle
  • Food
  • Travel
  • Health
  • Tech
  • Business
  • Money
  • Digital
  • Gaming
  • Auto
  • Fashion
  • Home
  • Mind
  • Learn
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn WhatsApp Telegram
Monday, September 14
  • About
  • Contact
  • Advertise
  • Disclaimer
  • Privacy Policy
  • Editorial Policy
  • Tools
  • Games
JustwebworldJustwebworld
  • People
  • Sports
  • Culture
  • Lifestyle
  • Food
  • Travel
  • Health
  • Tech
  • Business
  • Money
  • Digital
  • Gaming
  • Auto
  • Fashion
  • Home
  • Mind
  • Learn
JustwebworldJustwebworld
Home » Tools » Design & Color » HSL to HEX Converter

HSL to HEX Converter

Michael Austin Updated:August 24, 2026

Convert hsl() colors to hex codes. Enter hue in degrees with saturation and lightness percentages — hsl(210, 100%, 56%) — and get the six-digit hex your stylesheets, design tools and emails expect, with the intermediate RGB values shown along the way.

From wheel-and-sliders to a shippable code

HSL is where colors get designed; hex is where they get deployed. You sketch a warm gold, quite saturated, medium light as hsl(42.9, 74.4%, 49%) — then need the hex for the stylesheet, the brand doc, the SVG. This converter is that hand-off, showing the intermediate RGB so the process stays inspectable.

How the algorithm rebuilds channels

Three derived quantities do the work: chroma C = (1 − |2L−1|) × S sets intensity; the hue’s 60° sector decides which channels receive C and its ramp companion X; the match m = L − C/2 lifts everything to the right lightness. For hue 42.9° (first sector, red→yellow), red takes C, green takes X, blue takes zero:

C = (1 − |2×0.49 − 1|) × 0.74 = 0.73
X = C × (1 − |(H/60 mod 2) − 1|)
m = L − C/2

(R, G, B) = ((C+m), (X+m), (0+m)) × 255 = rgb(218, 165, 32) = #daa520

Angles beyond 0–360

Hue is genuinely an angle: -140°, 220° and 580° name the same direction, and CSS accepts deg, rad, grad and turn units. The converter normalizes all of them, so formulas that emit accumulated rotations (animation code, generative palettes) can paste their raw output.

When the result surprises you

Three usual suspects: saturation and lightness swapped (hsl order is H, S, L); a saturation of 0 flattening every hue to the same gray; or expecting perceptual behavior from L — hsl(60, 100%, 50%) and hsl(240, 100%, 50%) share a lightness number and nothing else visually. The preview swatch settles disputes instantly.

Reference values, computed live

A pocket reference for the round trip. Seven hsl() specifications and their exact hex spellings:

ColorHSLHEX
orchidhsl(302.3, 58.9%, 64.7%)#da70d6
tomatohsl(9.1, 100%, 63.9%)#ff6347
mediumseagreenhsl(146.7, 49.8%, 46.9%)#3cb371
mediumpurplehsl(259.6, 59.8%, 64.9%)#9370db
goldenrodhsl(42.9, 74.4%, 49%)#daa520
crimsonhsl(348, 83.3%, 47.1%)#dc143c
olivedrabhsl(79.6, 60.5%, 34.7%)#6b8e23

Rows like these are the fastest audit for any HSL implementation you meet in the wild — a spreadsheet formula, a legacy utility, a snippet from a forum. Feed it these inputs; disagreements with this table’s output localize the bug (usually a degrees-versus-normalized-hue mix-up) in seconds.

How to use the HSL to HEX Converter

  1. Type the HSL color – hsl(210, 100%, 56%) or bare values like 210, 100%, 56%.
  2. The result updates live as you type – no convert button needed.
  3. Copy the hex code, or open the all-formats output for every other notation.
  4. Share the exact result: the page URL updates with your input, so the link reproduces it.

Frequently asked questions

How does HSL convert back to a hex code?

The standard algorithm computes chroma from saturation and lightness, splits the hue into one of six 60° sectors to distribute chroma across channels, adds a lightness match term, then scales to 0-255 and formats base-16. The tool prints the sector and values it used.

Why do hsl(210, 100%, 56%) and #1e90ff differ slightly?

Because 56% is a rounded lightness. Dodger blue is exactly hsl(209.6, 100%, 55.9%); feeding the rounded 56% lands one step away. One-decimal HSL is usually close enough, but pixel-exact work should round-trip through the tool to check.

Can I use hue angles above 360 or negative?

Yes – hue is an angle, so 570° and 210° and −150° are the same direction. The converter normalizes any angle into 0-360 before computing, and also accepts deg, turn, rad and grad units like CSS does.

What does 100% saturation with 50% lightness produce?

The purest possible version of the hue – maximum chroma, no white or black mixed in. Moving lightness either way from 50% at full saturation begins washing toward white or crushing toward black.

Why did my HSL color come out gray?

Check the saturation: at 0% every hue renders the identical gray for a given lightness. A common cause is entering saturation and lightness in the wrong order – hsl() is hue, then saturation, then lightness.

Does this handle hsla() with alpha?

Yes – a fourth value or slash-alpha parses fine, and the output switches to 8-digit hex so the opacity survives the conversion. hsla(210, 100%, 56%, 0.5) and hsl(210 100% 56% / 50%) both work and mean the same color.

Which is better to store in a design system, HSL or HEX?

Store what your tools consume. Hex is universal and compact; HSL is self-documenting and hand-editable. Increasingly the strongest answer is OKLCH, which keeps the editability while fixing HSL's lightness lies – this site converts to all three.

Related color converters

More in Design & Color.

  • HEX to HSL Converter — Convert hex color codes to HSL — hue on the 360° wheel, saturation and lightness as percentages.
  • HSL to RGB Converter — Convert hsl() colors back to RGB channels.
  • RGB to HEX Converter — Convert RGB channel values to a hex color code.
  • Color Wheel — An interactive color wheel with harmony overlays.
  • RGB to HSL Converter — Convert RGB values to HSL and see the arithmetic: lightness is the average of the largest and smallest channel, saturation comes from their spread, and hue from which channel leads.
  • HSV to HEX Converter — Turn HSV/HSB picker values into a usable hex code.

cards
Powered by paypal
Follow on WhatsApp Follow on Telegram
Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram WhatsApp Copy Link
Previous ArticleHEX to HSL Converter
Next Article RGB to HSL Converter
Michael Austin
  • Website
  • Facebook
  • X (Twitter)
  • Pinterest
  • Instagram
  • LinkedIn

Michael Austin is the current owner of Justwebworld and manages the platform’s editorial direction, content strategy, and digital publishing operations. With a strong interest in online media and modern publishing, he focuses on creating informative, engaging, and easy-to-understand content across multiple categories.Under his leadership, Justwebworld continues to grow as a trusted multi-niche digital publication covering technology, business, lifestyle, automotive, sports, travel, and trending internet topics for readers worldwide.

Related Posts

Store Credit Card Logins: Issuers, Portals & Phone Numbers

CT Scan Procedure Explained: Step-by-Step Guide for Patients

Refreshing Summer Sips and Fruit Beverages to Serve Your Guests

IRS and Colorado Tax Debt: The Relief Programs Denver Taxpayers Should Know

Where Should NRIs Keep Money for Everyday Expenses in India?

The Role of Data Analytics in Health Insurance Pricing

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 41.9K other subscribers
Categories
Latest Posts

Store Credit Card Logins: Issuers, Portals & Phone Numbers

CT Scan Procedure Explained: Step-by-Step Guide for Patients

Refreshing Summer Sips and Fruit Beverages to Serve Your Guests

IRS and Colorado Tax Debt: The Relief Programs Denver Taxpayers Should Know

Where Should NRIs Keep Money for Everyday Expenses in India?

The Role of Data Analytics in Health Insurance Pricing

Filing a Personal Injury Claim in Durham

Looking for Easy Banking After Retirement? Consider a Digital Savings Account

Can I Get ₹1.5 Crore Term Insurance on a ₹10 Lakh Salary?

How to Switch Your Car Insurance Company Without Losing Your Benefits?

The content on this website is provided solely for educational and informational purposes. We do not promote, endorse, or deal in any products, services, or activities mentioned. While we strive to share accurate and up-to-date information, we make no warranties regarding completeness, reliability, or accuracy. Any action you take based on the information found here is strictly at your own risk, and we will not be liable for any losses or damages in connection with the use of our website.

DMCA.com Protection Status
Justwebworld

Explore knowledge, feed curiosity — trusted by readers since 2012.

Explore Topics
TechBusinessDigitalMoneyLearnPeopleLifestyleCultureHealthHomeTravelGamingFashionAutoFoodMindLawSportsShoppingAI
Popular Tools
Age CalculatorWord CounterCase ConverterLove CalculatorReading TimePeriod CalculatorNumber to WordsAngel NumberHarry Potter NameDemon NameKingdom NameAll Tools →
Popular Games
Bubble BlastSudokuTruth or Dare WheelYes / No WheelAll Games →
Facebook X (Twitter) Instagram Pinterest YouTube Tumblr LinkedIn WhatsApp Telegram Threads RSS
  • About
  • Contact
  • Advertise With Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
  • Editorial Policy
  • Write for Us
Copyright © 2012-2026. Justwebworld - All Rights Reserved. | Sitemap

Type above and press Enter to search. Press Esc to cancel.