DeveloperFormula-based · Runs in your browser

Color Converter

Convert colors between HEX, RGB, and HSL formats.

Loading calculator…

Saved locally, explained clearly

Drafts, calculations, scenarios, and workflow progress stay in this browser unless you export them.

Opening local database…

Calculation steps

Follow what happened from the selected formula to the displayed answer.

Show substituted values and intermediate working
Calculate current inputs to see the working.
  1. 1

    Formula selected

    The calculator uses the following formula or method.

    RGB, HEX, and HSL values are converted with the standard color-space transformation equations.

  2. 2

    Values entered

    Your values are placed into the calculation.

    Enter values to see what is used in this step.

  3. 3

    Result calculated

    The formula or method produces the following result values.

    Results will appear after a successful calculation.

  4. 4

    Answer formatted

    Displayed values are rounded and formatted using each output’s configured precision.

Scenario comparison

Save working scenarios, then select two or three to compare. Formula versions and inputs remain visible.

No scenarios saved for this calculator yet.

Recent calculations

Successful calculations are retained locally according to your privacy settings.

No local history for this calculator yet.

Data and privacy

How it works

Convert colors between HEX, RGB, and HSL formats.

Input query strings and outputs

Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.

Input query strings

3
  • ?hex= HEX

    Text · Optional · Default: #FF5733

  • ?rgb= RGB

    Text · Optional · Default: 255, 87, 51

  • ?hsl= HSL

    Text · Optional · Default: 10, 100%, 60%

Outputs

1
  • result Result

    Text · Primary output

result contains the calculator’s complete rendered result area, including its visible result cards, tables, charts, and messages.

Convert colors between HEX, RGB, and HSL

Description

The Color Converter is a specialized tool for designers and front-end developers. It bridges the gap between different color representation systems: HEX (standard for web), RGB (standard for monitors), and HSL (more intuitive for human adjustment). As you type a code, the tool updates the other formats and provides a live visual preview of the color.

Inputs

  • HEX: Hexadecimal color code starts with # (e.g., #FF5733).
  • RGB: Red, Green, Blue values (e.g., 255, 87, 51).
  • HSL: Hue, Saturation, Lightness values (e.g., 10, 100%, 60%).

Outputs

  • Live Preview: A large box showing the selected color.
  • Shade Palette: A row of boxes showing the color at different opacity levels (80%, 60%, 40%) to help with UI design.

Chart

  • N/A: This tool provides a live visual design preview.

“Good to Know”

  • Redox: RGB is an “additive” color model. When all three colors are at 255 (max), you get pure white. At 0, you get pure black.
  • HSL Intuition: HSL is often preferred by designers because “Lightness” makes it very easy to create lighter or darker versions of the same color without changing the “Hue.”
  • Browser Support: All modern browsers support all three formats in CSS, but HEX remains the most popular for branding and documentation.

Examples

Example 1: Classic Red

  • Input: HEX: #FF0000
  • Output: RGB: 255, 0, 0

Example 2: Royal Blue

  • Input: HEX: #4169E1
  • Output: RGB: 65, 105, 225

Example 3: Slate Gray

  • Input: HEX: #708090
  • Output: RGB: 112, 128, 144
Sources
  • No external reference is listed for this calculator. Its formula and variable definitions are shown above.
Limitations
  • Output is generated locally. Check the required format, character encoding, and compatibility with the system that will use it.