HEX, RGB and HSL Conversion
Convert between popular CSS color formats without manually calculating color channels.
Convert HEX, RGB and HSL colors with the free color code converter from VeltoGen. Use our HEX colour converter to translate hexadecimal codes, or our RGB color converter for CSS values. Preview colors, handle alpha transparency and copy converted formats instantly.
Paste a supported color format, choose from the presets or use the visual color picker.
Color conversions update as you type. Choose a format and see a live result.
Your color preview updates automatically. Click Convert Color to view the completed result and enable TXT download.
◆ Color conversions are processed locally in your browser.
Preview your color and copy the formats needed for CSS or design work.
Enter a supported HEX, RGB or HSL color to view its conversion.
HEX, RGB and HSL are alternate ways to represent color values. Transparency can change the final rendered appearance depending on the background.
Web colors can be written in different formats. HEX codes describe red, green and blue channel values using hexadecimal notation. RGB uses numeric red, green and blue values, while HSL describes hue, saturation and lightness.
The VeltoGen color code converter helps designers and developers switch between these common formats. Enter a supported color value and the converter automatically identifies the input format.
Our free HEX colour converter supports shorthand codes, standard six-digit codes and transparent four-digit or eight-digit HEX values. Use the built-in RGB color converter to work with RGB, RGBA, HSL and HSLA notation.
You can also choose from ten preset colors, use the color picker, compare basic contrast ratios and copy ready-to-use CSS values. All conversion calculations run directly in the browser.
Translate HEX, RGB and HSL colors in four steps.
Paste a HEX, RGB or HSL value, select a preset or choose a color with the picker.
The input format is detected automatically and the color preview updates as you type.
Compare HEX, RGB, HSL, RGB percentages, transparency and contrast estimates.
Copy individual color formats or click Convert Color to download the conversion report.
Automatic color detection, transparency support, interactive previews and simple export options.
Convert between popular CSS color formats without manually calculating color channels.
Enter any supported color code without selecting its input format.
Convert HEX alpha, RGBA and HSLA colors while preserving transparency.
Choose colors visually and see the converted swatch instantly.
Compare white and black text contrast, with a defined white background assumption for transparency.
Copy individual values or save the complete conversion to a text file.
Simplify design handoffs, CSS styling and color comparisons.
Move color values between design applications, CSS and developer workflows.
Use consistent channel calculations and formatting instead of manual hexadecimal arithmetic.
Review basic white and black text contrast before choosing a UI color.
Perform conversions without submitting your color codes to an external processing API.
Useful for websites, applications, design systems and brand palettes.
Convert HEX design references into RGB or HSL for component styling.
Copy reusable color tokens into a stylesheet or design system.
Compare black and white text contrast when building interface colors.
Use presets and color picker input to translate colors across design formats.
Compare equivalent values and use the reference table when styling CSS elements.
#FF5733RGB COLORrgb(255, 87, 51)Both formats describe the same red-orange color.
rgb(0, 128, 128)HEX COLOR#008080The corresponding HEX code is commonly called teal.
hsl(240, 100%, 50%)HEX COLOR#0000FFThis HSL notation represents pure blue.
| Color | HEX | RGB | HSL |
|---|---|---|---|
| Red | #FF0000 | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| Yellow | #FFFF00 | rgb(255, 255, 0) | hsl(60, 100%, 50%) |
| Lime | #00FF00 | rgb(0, 255, 0) | hsl(120, 100%, 50%) |
| Blue | #0000FF | rgb(0, 0, 255) | hsl(240, 100%, 50%) |
| Orange | #FFA500 | rgb(255, 165, 0) | hsl(39, 100%, 50%) |
| Teal | #008080 | rgb(0, 128, 128) | hsl(180, 100%, 25%) |
| White | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
| Black | #000000 | rgb(0, 0, 0) | hsl(0, 0%, 0%) |
Learn color representation, conversion, contrast and practical CSS usage.
HEX colors use hexadecimal characters to describe red, green and blue components. Six-digit values represent three channels, while three-digit values are shorthand. Four and eight-digit versions can also include alpha transparency.
RGB colors specify red, green and blue intensities. The conventional channel range is 0 to 255. You can also express RGB channels as percentages in supported syntax.
HSL represents hue, saturation and lightness. Hue is a position around the color wheel, while saturation and lightness control the appearance of the selected color.
Alpha controls opacity between zero and one. Transparent color values can appear differently depending on the surface behind them, even though the underlying RGB color remains the same.
Text contrast is based on relative luminance. This converter compares white and black text with the selected background. If the color has transparency, its displayed contrast is calculated after compositing it over white.
Some colors cannot be represented with identical precision across HEX, RGB and HSL formats. Conversion can involve rounding integer RGB channels or fractional HSL values.
Copy the resulting HEX, RGB or HSL notation directly into compatible CSS properties. You can also copy the generated custom property for reuse in a stylesheet.
Color parsing, HEX/RGB/HSL calculations and contrast estimates run locally in your browser. This tool does not require an external conversion API.
Color conversion may involve rounding. Contrast results should be checked against the actual background used in your design.
Answers about HEX, RGB, HSL, alpha, color picking and contrast.
A color code converter translates a color between representations such as HEX, RGB and HSL. The resulting values can be used in websites, CSS and design workflows.
Enter a hexadecimal color such as #FF5733. The converter shows its RGB values, which are rgb(255, 87, 51), along with additional formats.
Enter a value such as rgb(255, 87, 51). The resulting hexadecimal color is #FF5733.
Yes. VeltoGen provides a free browser-based HEX colour converter without an external color conversion API.
Yes. Enter an HSL value such as hsl(120, 100%, 50%) to obtain RGB and HEX representations.
Supported inputs include 3, 4, 6 and 8 digit HEX, rgb(), rgba(), hsl(), hsla(), and simple comma-separated RGB or HSL values.
No. The converter accepts supported hexadecimal strings with or without the leading # character.
A three-digit HEX color is shorthand. For example, #F53 expands to #FF5533.
RGB stands for red, green and blue. Each channel is normally represented by a value from 0 to 255.
HSL stands for hue, saturation and lightness. Hue describes a position around a color wheel, while saturation and lightness are percentages.
Yes. The converter accepts four-digit and eight-digit HEX codes as well as rgba() and hsla() inputs with alpha transparency.
Alpha represents opacity. An alpha of 1 is fully opaque, while 0 is fully transparent.
Yes. Enter a supported HEX, RGB or HSL expression, and the tool identifies the format while calculating the equivalent values.
Yes. The built-in browser color picker allows selecting an opaque color and viewing the corresponding conversions.
Yes. Turn off Uppercase HEX to display lowercase hexadecimal letters in the generated values.
RGB values use integer channels. Converting between RGB and HSL can introduce small differences because of rounding.
The converter uses the WCAG 2.x relative luminance formula. Transparent colors are composited over a white background for the displayed contrast estimate.
WCAG 2.x AA generally requires at least 4.5:1 for normal text and 3:1 for large text. Other accessibility requirements may also apply.
Yes. Copy individual converted values or click Convert Color to prepare a downloadable text report containing the color formats.
Color parsing and conversion run locally in the browser. This component does not upload colors or store them in browser storage.