ToolPony.comDocumentation

Color converter

Convert HEX, RGB and HSL, preserve alpha and preview the color.

Get started

  1. Use the example values or enter your own measurements.
  2. Calculate, then copy the result or download the available details.

Example

Input

rgb(102, 51, 153)

Expected result

#663399, hsl(270 50% 40%)

Try it

Good to know

The calculation runs in your browser. Use consistent units in fields with no explicit unit.

Calculation method

HEX represents 8-bit channels. RGB accepts numbers or percentages. HSL uses degrees for hue and percentages for saturation and lightness. HEX output rounds channels to the nearest byte.