Color Picker & Converter

Pick any color and get HEX, RGB, and HSL codes. Use the sliders, type a code, or use the native picker.

#38BDF8
Complementary Palette

How Color Codes Work

Digital screens display colors by mixing red, green, and blue light at different intensities. Every color you see on a screen is a combination of these three channels, each ranging from 0 (off) to 255 (full brightness). This is the RGB color model. HEX codes are simply a more compact way to write RGB values using hexadecimal notation. HSL (hue, saturation, lightness) is a more intuitive model that describes colors the way humans think about them.

HEX Color Codes

A HEX color code starts with # followed by six hexadecimal digits. The first two represent red, the middle two green, and the last two blue. Each pair ranges from 00 (0 in decimal, no color) to FF (255, full intensity). For example, #FF0000 is pure red, #00FF00 is pure green, and #0000FF is pure blue. #000000 is black (all off), and #FFFFFF is white (all full). HEX codes are the standard format for colors in CSS and HTML.

RGB Color Model

RGB expresses the same information as HEX but in decimal. rgb(255, 0, 0) is the same red as #FF0000. CSS accepts both formats interchangeably. RGB also supports an alpha channel for transparency: rgba(255, 0, 0, 0.5) is 50% transparent red.

HSL Color Model

HSL stands for hue, saturation, and lightness. Hue is the color angle on a 360-degree color wheel (0/360 is red, 120 is green, 240 is blue). Saturation is the intensity from 0% (gray) to 100% (vivid). Lightness goes from 0% (black) to 100% (white), with 50% being the pure color. HSL is often easier to work with when you want to create variations of a color because you can adjust saturation and lightness independently without affecting the hue.

Color Picker FAQ

How do I find the HEX code for a color?
Use the color picker above to visually select your color, or type RGB values. The HEX code updates automatically. You can also use your browser's built-in color picker by clicking the small square in the top right of the preview area.
What is the difference between HEX and RGB?
They represent the same colors in different formats. HEX uses hexadecimal (#FF5733) while RGB uses decimal values (rgb(255, 87, 51)). CSS and HTML accept both. HEX is more compact; RGB is easier to read for humans.
How do I make a color lighter or darker?
The easiest way is to use HSL. Keep the hue and saturation the same, and increase lightness to make it lighter or decrease it to make it darker. A lightness of 50% is the pure color, 70-80% is a light tint, and 20-30% is a dark shade.
What is a complementary color?
A complementary color is directly opposite on the color wheel (180 degrees apart in HSL). Complementary pairs create strong visual contrast. The palette strip above shows your selected color's complementary and analogous colors.
Can I use these colors in CSS?
Yes. Copy any of the three formats (HEX, RGB, or HSL) and paste it directly into your CSS. All modern browsers support all three color formats.