Color converter

Convert a color between HEX, RGB, and HSL, preview it, and copy the values to use in CSS.

Ready to useIn your browser · no account

#FFDC45

Use #FDC, #FFDC45, rgb(255, 220, 69) or hsl(49, 100%, 64%). No alpha channel.

How to use

  1. Enter a color in HEX, rgb(), or hsl(), or choose one with the color picker.
  2. Click Convert and review the preview and CSS color declarations in HEX, RGB, and HSL.
  3. Copy the CSS representation you need into your project and assess its contrast against the background where it will appear.

How it works

Accepts opaque colors: 3- or 6-digit HEX, RGB with integer channels from 0 to 255, and HSL with saturation and lightness from 0% to 100%. Conversion does not assess contrast or accessibility.

An example

The color #FF0000 equals rgb(255, 0, 0) and hsl(0, 100%, 50%).

Common questions

What is the difference between RGB and HSL?

RGB describes red, green, and blue intensities. HSL organizes the same color by hue, saturation, and lightness, which can help when adjusting its appearance.

Can I convert a transparent color?

This tool works with colors that have no alpha channel. RGBA, HSLA, and HEX values with transparency require a tool that also supports opacity.