← All tools

DEVELOPER TOOL

Colour Code Converter

Convert validated CSS colour values between hex, RGB, and HSL formats.

Accepts 3/4/6/8-digit hex plus rgb(), rgba(), hsl(), and hsla() forms, including percentage channels and modern slash alpha.

HEX: #5b4b8a
RGB: rgb(91, 75, 138)
HSL: hsl(255 30% 42%)

Colour conversion runs locally in your browser.

How to use Colour Code Converter

  1. Enter a supported HEX, RGB(A), or HSL(A) colour.
  2. Check the validated colour preview and converted values.
  3. Copy the format you need for your CSS or design.

Which colour formats are supported?

The converter supports common CSS hexadecimal, RGB/RGBA, and HSL/HSLA notation.