Color Picker & Converter
Pick colors visually, convert HEX to RGB or HSL, and build instant palettes. Copy color codes for design systems, CSS, or UI mockups.
Color palette
Tints and shades generated from the base color.
What is a color picker?
A color picker lets you select a color visually and read its values in different formats. Designers use it to build palettes, while developers use it to copy HEX, RGB, or HSL values into CSS and design tokens.
This tool combines a visual picker with converters so you can move between formats without manual math. It also generates a palette of tints and shades for UI systems.
HEX, RGB, and HSL explained
HEX is a base-16 format commonly used in web design. RGB represents red, green, and blue channels as numbers from 0 to 255. HSL represents hue, saturation, and lightness, which makes it easier to adjust a color while keeping the same hue.
If you need predictable tints, HSL is often easier to reason about. If you need exact values for images or canvas work, RGB is a better fit. HEX is a compact format that is widely supported in CSS.
How HEX colors work
HEX colors are just RGB values written in base-16. The first two characters represent red, the next two represent green, and the last two represent blue. For example, #2563EB means red 37, green 99, and blue 235.
HEX is popular because it is short and easy to paste into CSS. It is also consistent across tools, so a HEX value from a design file will match what you see in the browser.
Convert HEX to RGB or HSL
Paste a HEX value and the tool converts it to RGB and HSL instantly. This helps when you have a brand color from a design system but need different formats for code or tools.
The conversion is lossless because HEX is just a compact form of RGB. HSL conversion is derived from the RGB channels and is ideal for adjusting lightness or saturation.
Use HSL for theming
HSL is great for theming because you can hold hue steady and adjust saturation or lightness. This helps you create lighter backgrounds, darker borders, and consistent hover states without changing the color identity.
Many design systems use HSL to generate color scales. It keeps variations balanced and predictable.
Generate palettes for UI work
Consistent UI systems rely on tints and shades. This color picker generates a palette based on your base color so you can create hover states, borders, backgrounds, and accents quickly.
Click any swatch to set it as the new base color. This is useful when you want to explore variations or adjust contrast without starting over.
Palette types you can build
Use a monochrome palette for clean UI components or generate a range of tints and shades for buttons and cards. For charts and data, pick distinct base colors and generate lighter variants for hover states.
For brand work, start with your primary color and build a scale so you can use the same hue across backgrounds, borders, and text.
Accessibility and contrast
Color contrast affects readability. When building UI components, aim for strong contrast between text and backgrounds. A color picker helps you explore lighter and darker shades to meet accessibility needs.
Use the palette to select a darker color for text on light backgrounds or a lighter color for text on dark backgrounds. This reduces eye strain and improves compliance with accessibility guidelines.
Common color mistakes
Many UI issues come from low contrast or overly saturated colors. Bright colors can look harsh on white backgrounds, while very light colors can disappear on cards. Use tints and shades to create balance.
Another common mistake is mixing too many hues. Keep a small set of base colors and vary lightness for hierarchy. This keeps interfaces calm and consistent.
Design system workflow
Start with a primary brand color and generate a palette. Choose a few key steps for text, borders, and backgrounds. Document the HEX and HSL values so designers and developers can align.
When you need new variants, adjust lightness in HSL rather than picking a random new hue. This keeps the visual system cohesive across components.
CSS variables and design tokens
Store your colors as CSS variables so you can update them in one place. Use the HEX values for base tokens and HSL for programmatic adjustments. This keeps themes consistent and easier to maintain.
A simple approach is to define a primary scale like --color-primary-500 and then reference it across buttons, links, and highlights. Use palette swatches to fill out the rest of the scale.
Color on different devices
Colors can look different on various screens due to brightness, color profiles, and ambient light. Test important UI colors on a phone and a desktop monitor to catch extreme shifts.
If a color feels too bright or too dull on some displays, adjust the lightness in HSL and regenerate the palette. Small tweaks can improve consistency across devices.
Color picker use cases
- Extract HEX or RGB values for CSS and design tokens.
- Convert brand colors to HSL for easier adjustments.
- Generate consistent palettes for product UI.
- Create color ramps for data visualizations.
- Match colors between Figma, Photoshop, and code.
Best practices for color systems
- Keep a small base palette and use tints and shades for variants.
- Test colors on real devices and backgrounds before shipping.
- Use HSL for systematic adjustments to lightness.
- Document HEX values so designers and developers stay aligned.
Examples
Example: Convert a brand color
Paste a HEX value from a style guide and copy the RGB or HSL values for CSS.
Example: Build a UI palette
Pick a base color and click a lighter swatch for backgrounds or hover states.
Example: Match a design tool
Use the picker to match colors between Figma and your codebase.
FAQ
What is the difference between HEX, RGB, and HSL?
HEX is a base-16 format used in CSS, RGB uses red/green/blue values, and HSL uses hue, saturation, and lightness.
Can I convert HEX to RGB or HSL?
Yes. Enter a HEX value or pick a color and the tool converts it to RGB and HSL instantly.
How do I copy color codes?
Use the Copy buttons next to HEX, RGB, or HSL to copy the value to your clipboard.
Does the palette update automatically?
Yes. The palette regenerates based on the current base color so you can explore tints and shades.
Is the color picker free?
Yes. The color picker and converters are free and run client-side.