Convert colors between HEX, RGB, and HSL formats instantly. Use the visual color picker, explore complementary colors and shade variations, copy CSS code, and browse preset palettes from Material Design and Tailwind CSS -- all client-side in your browser.
Paste any color value -- HEX, RGB, or HSL -- and the tool automatically detects the format and converts it to all three representations simultaneously. No need to specify the input type.
Use the built-in HTML5 color picker to select colors visually. The picker updates all outputs in real time as you drag through the color space, making it easy to find the perfect shade.
Instantly see 5 lighter and 5 darker shade variations of any color, plus the complementary color on the opposite side of the color wheel. Click any swatch to load that color.
Get copy-paste-ready CSS declarations for your color in all three formats. Copy individual values or the full CSS block with a single click to use directly in your stylesheets.
Colors on the web can be expressed in several formats. The three most common are HEX, RGB, and HSL. Each represents the same colors but uses different models, and choosing the right one depends on your use case. This tool converts between all three formats instantly, making it easy to work with colors across design tools, CSS, and JavaScript.
HEX (hexadecimal) is the most common color format in CSS. It uses a hash symbol followed by six hexadecimal digits representing red, green, and blue channels (e.g., #FF5733). A shorthand form uses three digits when each pair is identical (e.g., #F00 is the same as #FF0000). HEX values range from 00 (0) to FF (255) for each channel.
RGB (Red, Green, Blue) specifies colors using decimal values from 0 to 255 for each channel (e.g., rgb(255, 87, 51)). This is a direct representation of how screens display color by mixing light from red, green, and blue subpixels. RGB is intuitive when you need to adjust individual channels programmatically.
HSL (Hue, Saturation, Lightness) describes colors using three properties: hue as a degree on the color wheel (0-360), saturation as a percentage (0% is gray, 100% is fully saturated), and lightness as a percentage (0% is black, 100% is white, 50% is the pure color). HSL is the most human-readable format and makes it easy to create color variations by adjusting lightness or saturation.
Type or paste a color value in any supported format into the input field. The tool auto-detects whether it is HEX, RGB, or HSL and instantly displays the converted values in all three formats. Use the color picker for visual selection. Click any output value to copy it. The complementary color, shade variations, and CSS code are generated automatically. Browse the Material Design or Tailwind CSS preset palettes and click any swatch to load that color.
#FF5733 represents red, green, and blue channels in hexadecimal. To convert manually, split the 6-digit hex into three pairs: FF (red = 255), 57 (green = 87), 33 (blue = 51). The result is rgb(255, 87, 51). Our tool does this conversion instantly -- just paste any HEX value and the RGB and HSL equivalents appear automatically.
#FF5733) to represent colors. RGB specifies red, green, and blue channel values from 0 to 255 (e.g., rgb(255, 87, 51)). HSL uses hue (0-360 degrees on the color wheel), saturation (0-100%), and lightness (0-100%) (e.g., hsl(11, 100%, 60%)). All three describe the same set of colors but in different models. HEX is the most compact, RGB is closest to how screens work, and HSL is the most intuitive for humans when adjusting brightness or creating color scales.
color in HEX format, background-color in RGB format, and border-color in HSL format. Click the "Copy CSS" button to copy all three declarations to your clipboard for immediate use in your stylesheets. You can also copy individual HEX, RGB, or HSL values using the Copy buttons next to each output row.
#RGB or #RRGGBB, with or without the hash symbol), RGB values (rgb(R, G, B)), and HSL values (hsl(H, S%, L%)). It also accepts rgba() and hsla() syntax, ignoring the alpha channel for conversion purposes. All conversions happen instantly and entirely in your browser -- no data is sent to any server.
Check out our other free developer tools. Format JSON, decode JWTs, parse cron expressions, and more -- all from your browser with no sign-up required.
JSON Formatter →