HEX ↔ RGB ↔ HSL Converter
Convert colors between HEX, RGB, and HSL formats with a live color preview.
Open HEX ↔ RGB ↔ HSL Converter
Convert HEX, RGB and HSL, generate color harmonies, and build Tailwind 50-950 shade scales.
These tools cover the color work that sits between a design file and working CSS. A designer hands you one brand hex code; you need its RGB values for a canvas script, a second color for buttons and charts that does not clash, and a full set of light and dark shades for backgrounds, borders, hover states and dark mode.
They are aimed at front-end developers, designers and anyone setting up a theme for a website or app. All three work from a single base color, give you copyable hex codes, and run in your browser as you type.
3 free tools. Everything runs in your browser; nothing you enter is uploaded.
Use this when you have a color in one notation and need it in another, or want to nudge a color lighter or darker by changing only its HSL lightness.
Use these once you have a base color: first to find companion colors with color-wheel harmonies, then to expand any chosen color into an 11-step Tailwind CSS scale with a ready `@theme` snippet.
Generate harmonious color palettes from any base color — complementary, analogous, triadic, and more.
Open Color Palette Generator
Generate Tailwind CSS v4 color shades (50–950) from any base color with a ready-to-copy @theme snippet.
Open Tailwind Palette Generator
HEX and RGB describe the same thing: amounts of red, green and blue from 0 to 255. #3b82f6 and rgb(59, 130, 246) are the same color, and converting between them is exact. Hex is compact and is what most design tools export; RGB is convenient in JavaScript and when you add transparency by hand with rgba().
HSL describes the color as a hue angle on the color wheel, a saturation and a lightness. It is the notation to think in when building related colors, because you can hold the hue steady and move only lightness or saturation. Both palette tools work this way internally. Keep a hex or RGB value as the source of truth, since whole-number HSL rounds and a round trip can land one step off in a channel.
A practical workflow uses all three tools in order:
primary to something like accent so both scales sit side by side in your @theme block.A harmonious palette is not automatically readable. Harmonies are chosen by hue, while legibility depends on the difference in lightness between text and its background. WCAG 2 asks for a contrast ratio of at least 4.5:1 for body text and 3:1 for large text and for interface parts such as button borders and icons.
Two colors of similar lightness, such as a mid blue and its complementary orange, can clash visually yet still fail as text on each other. As a rule of thumb, pair text from the dark end of a Tailwind scale with backgrounds from the light end, and check every text and background pair with a contrast checker before you ship. Never rely on color alone to convey meaning, such as red for an error; add an icon or a label too.
Common questions about Color Tools.
--color-primary-500, which you can also read with var() in ordinary stylesheets.rgba() or a Tailwind opacity modifier such as bg-primary-500/50. Spaces such as OKLCH, CMYK or Pantone are not supported.