CSS Color Converter
~/tools/color $ ./mix
input
preview
#1890FF
values.json
Converted Colors
HEX:#1890ff
HEX8:#1890ffff
RGB:rgb(24, 144, 255)
HSL:hsl(209, 100%, 55%)
HSV:hsv(209, 91%, 100%)
Name:-
HEX to RGB
Design handoffs mix HEX, RGB, and HSL depending on the tool. This converter translates between representations—including alpha—so you can implement Figma tokens in CSS variables, Canvas, or native SDKs without channel mix-ups.
How to use
- Enter a color as HEX (`#RRGGBB` or shorthand) or set RGB/HSL sliders.
- Check the alternate formats and note whether values assume sRGB or need gamma correction for your target.
- Copy the format your code expects (`rgb()`, `hsl()`, or 8-digit HEX with alpha) into stylesheets or design tokens.
FAQ
- Why do HSL lightness tweaks look uneven across hues?
- HSL is not perceptually uniform; LCH or OKLCH often match human contrast better. Still use WCAG contrast checkers for text on backgrounds.
- What does 8-digit HEX mean?
- The last pair is alpha in hex—`#RRGGBBAA`; some APIs expect ARGB instead—double-check ordering in Android or graphics APIs.
- Should I store brand colors as HEX or RGB?
- Pick one canonical form in your design system; CSS happily accepts multiple but mixing can drift rounding—document the source of truth.