Nuevo

Convertidor HEX a RGB

Convierte entre valores de color HEX y RGB al instante. También muestra valores HSL con vista previa de color en vivo.

HEX
RGB
HSL
Admite códigos HEX de 3 dígitos (#F00) y 6 dígitos (#FF0000). Los valores RGB van de 0 a 255.

How to Use This Tool

  1. 1

    Choose conversion direction

    Select 'HEX → RGB' to convert a hex color code to RGB values, or 'RGB → HEX' to go the other way.

  2. 2

    Enter your color value

    For hex mode, type a color code like #3B82F6 or 3B82F6 (3-digit shorthand also works). For RGB mode, enter red, green, and blue values (0–255).

  3. 3

    Preview and compare formats

    A color swatch preview appears along with the color expressed in HEX, RGB, and HSL formats simultaneously.

  4. 4

    Copy any format

    Click on any color value (HEX, RGB, or HSL) to copy it to your clipboard for use in CSS, design tools, or code.

Frequently Asked Questions

What is a HEX color code?
A HEX color code is a 6-digit hexadecimal number (e.g., #FF5733) representing red, green, and blue channels. Each pair of digits ranges from 00 to FF (0–255 in decimal). A 3-digit shorthand like #F00 expands to #FF0000.
What is the difference between RGB and HSL?
RGB defines color by red, green, and blue light intensity (0–255 each). HSL uses Hue (0–360°), Saturation (0–100%), and Lightness (0–100%), which is often more intuitive for adjusting colors.
Can I use this for CSS colors?
Yes. All output formats — hex (#3B82F6), rgb(59, 130, 246), and hsl(217, 91%, 60%) — are valid CSS color values that work in stylesheets and inline styles.
What happens with invalid input?
The tool validates your input in real time. Invalid hex characters or RGB values outside the 0–255 range will show no result until corrected.