Pick a Color
What is a Color Picker?
A Color Picker is a tool that allows you to select a color visually and convert it between different formats like HEX, RGB, and HSL. This free online tool helps developers and designers quickly get the exact color codes they need for their projects.
HEX vs RGB vs HSL
HEX uses hexadecimal notation with base-16 values (00-FF) for red, green, and blue channels. It is compact and the most common format in CSS and web development. Use HEX when you need brevity and compatibility with CSS.
RGB expresses colors using decimal values from 0 to 255 for each channel. It is intuitive for programmers and directly maps to how screens render color. Use RGB when working with image processing or canvas APIs.
HSL represents color through hue (0-360 degrees), saturation (0-100%), and lightness (0-100%). It is human-friendly and makes it easy to generate variations. Use HSL when creating color palettes or adjusting tones programmatically.
Color Model Basics
There are two fundamental color models. Additive color (RGB) starts with black and adds light to create colors—it is how screens emit color using red, green, and blue subpixels. Subtractive color (CMYK) starts with white and subtracts light using pigments—it is used in printing where cyan, magenta, yellow, and black absorb wavelengths.
Web and digital tools use the additive RGB model, where combining full red, green, and blue produces white. Understanding this helps explain why HEX values start with # and why color pickers default to RGB output.
Understanding Color Formats
#667eea
Uses base-16 values from 00 to FF for red, green, and blue. Compact and widely used in CSS.
rgb(102, 126, 234)
Defines color by specifying the intensity of each channel from 0 to 255.
hsl(231, 75%, 67%)
Hue is degrees (0-360), saturation and lightness are percentages (0-100%).
Frequently Asked Questions
What is the difference between HEX and RGB?
HEX is a hexadecimal representation using base-16 values, while RGB uses decimal values from 0-255. They represent the same color but in different notations. HEX is more compact for CSS, while RGB is easier to manipulate programmatically.
When should I use HSL over RGB?
Use HSL when you need to generate color variations or adjust tones. HSL makes it easy to change saturation and lightness while keeping the same hue, which is useful for creating color themes and gradients.
Can I copy colors directly to CSS?
Yes, simply click the Copy button next to any format. The copied text can be pasted directly into your CSS file as hex codes like #667eea or rgb values like rgb(102, 126, 234).
Why do screens use RGB instead of CMYK?
Screens emit light rather than reflect it, so they use additive color (RGB). Printers use subtractive color (CMYK) because they work with pigments that absorb certain wavelengths of light.
What is the range of values in each format?
HEX uses two-character pairs (00-FF) per channel, RGB uses 0-255 per channel, and HSL uses hue 0-360 degrees with saturation and lightness 0-100%.
Are HEX, RGB, and HSL case-sensitive?
In CSS, HEX codes are case-insensitive (#667eea equals #667EEA). RGB and HSL values are typically written in lowercase, but browsers accept uppercase notation as well.
Real-World Use Cases
- CSS Styling: Quickly get color codes for web development projects
- Design Systems: Generate consistent color palettes for UI components
- Accessibility Checking: Ensure sufficient contrast ratios between foreground and background colors
- Color Variations: Create tints and shades by adjusting HSL values systematically