tools / developer
Convertisseur de couleurs
Convertissez entre HEX, RGB, HSL et HSV.
contraste sur blanc : 3.68:1 ✗ échoue AA
contraste sur noir : 5.71:1 ✓ AA
HEX#3B82F6
RGBrgb(59, 130, 246)
RGBArgba(59, 130, 246, 1)
HSLhsl(217, 91%, 60%)
HSVhsv(217, 76%, 96%)
CSScolor: #3B82F6;
FAQ
- Quelle est la différence entre HSL et HSV ?
- HSL (Teinte, Saturation, Luminosité) est utilisé en CSS. HSV (Teinte, Saturation, Valeur/Luminosité) est utilisé dans les outils de conception comme Figma et Photoshop. Le blanc pur est HSL(0, 0 %, 100 %) vs HSV(0, 0 %, 100 %). Le rouge pur est HSL(0, 100 %, 50 %) vs HSV(0, 100 %, 100 %).
- Que signifie le contraste WCAG ?
- La conformité AA exige un ratio de contraste d'au moins 4,5:1 pour le texte normal. Un contraste plus élevé signifie une meilleure lisibilité pour les utilisateurs ayant des déficiences visuelles.
À PROPOS DE CET OUTIL
Enter a color in HEX, RGB, HSL, or HSV and instantly see the equivalent values in all other formats. HEX and RGB describe a color as red, green, and blue channel intensities, while HSL (hue, saturation, lightness) and HSV (hue, saturation, value) describe the same color more intuitively in terms of the color wheel, how vivid it is, and how light or dark it is — which is why designers often prefer adjusting HSL sliders while developers write HEX or RGB into CSS. Useful when moving colors between design tools and code, or when a CSS property requires a format different from what you have, such as needing an rgba() value with transparency derived from a HEX swatch.
COMMENT UTILISER
- Paste or type a color value in any supported format — HEX like #3366ff, RGB like rgb(51,102,255), HSL, or HSV.
- The tool auto-detects the format and instantly shows the equivalent values in the others.
- Preview the resulting swatch to confirm it's the color you expected.
- Adjust sliders (if available) for hue, saturation, or lightness to fine-tune the color visually.
- Copy whichever format your CSS, design tool, or code needs.
- Add an alpha/opacity value if you need an rgba() or hsla() variant for transparency.
CAS D'USAGE COURANTS
- A frontend developer receives a HEX color from a designer's Figma file and needs the RGB values to plug into a canvas drawing API.
- Someone building a themed UI adjusts a base color's HSL lightness to generate lighter and darker shades for hover states.
- A designer handing off specs to a developer converts a color picked in HSV (common in design software) into the HEX code developers expect in CSS.
- A developer debugging inconsistent colors across browsers checks whether an rgba() value and a hex-with-alpha value are actually equivalent.
- Someone building a data visualization picks colors by adjusting hue systematically across a set of categories and needs HEX codes for each.
CONSEILS ET ERREURS COURANTES
- HEX shorthand like #fff is equivalent to the full #ffffff — each shorthand digit is just duplicated once.
- HSL lightness and HSV value are not the same thing despite looking similar — a fully saturated color with 100% HSV value can still look darker in HSL terms, so don't assume the numbers translate directly between them.
- CSS supports an optional alpha channel in every format (#RRGGBBAA, rgba(), hsla()), so if a color looks right but is fully opaque when you expected transparency, check whether the alpha value was dropped during conversion.
- When picking accessible color combinations, adjusting HSL lightness while keeping hue and saturation fixed is often the easiest way to create a contrast-compliant text color on a given background.
AUTRES QUESTIONS
- What's the actual difference between HSL and HSV?
- Both use hue and saturation, but HSL's third value (lightness) treats pure white and pure black as extremes of the same axis, while HSV's third value (value/brightness) measures distance from black only, with white requiring low saturation as well as high value — so the same hue can look visually different in each model.
- Does converting between formats ever lose precision?
- Practically no for typical 8-bit-per-channel colors, but converting through HSL/HSV and back to RGB can introduce tiny rounding differences of a unit or two per channel due to floating-point math in the conversion formulas.
- Why does my HEX color have 8 characters instead of 6?
- An 8-character HEX code includes an alpha channel (#RRGGBBAA) for transparency, supported in modern CSS but not recognized by older tools expecting the standard 6-character format.
- Can I convert named CSS colors like "rebeccapurple"?
- Many converters support the standard CSS named color keywords by looking up their fixed HEX equivalent, but named colors are a fixed list defined in the CSS Color spec, not a mathematical conversion like the others.
GUIDES ASSOCIÉS
Les codes couleur expliqués
Ce que signifient les codes couleur HEX, RGB et HSL, comment convertir entre eux et quand utiliser chaque format.