Convert RGB, RGBA, HEX and HSL colour values into each other — with sliders, a live preview and one-click copy of every value.
Red
Green
Blue
Live preview
HEX#FF0000
RGBrgb(255, 0, 0)
RGBA (2 decimals)rgba(255, 0, 0, 1.00)
HSLhsl(0, 100%, 50%)
HSVhsv(0, 100%, 100%)
Accepts #RGB, #RGBA, #RRGGBB and #RRGGBBAA, rgb()/rgba() with commas, and hsl()/hsla(). Channels are clamped to 0-255, alpha to 0-1 and shown with two decimals. Values without a valid format are rejected with a message instead of being applied.
How the RGB to HEX Converter Works
This converter translates between the colour notations you paste into CSS, HTML and design tools. Type a HEX value such as #3366CC, an RGB value such as rgb(255, 0, 0) or an HSL value such as hsl(0, 100%, 50%) into the matching field and the other two are filled in straight away. The red, green, blue and alpha sliders build a colour by hand, and the preview swatch and the read-out lines update while you drag. Values are clamped and rounded instead of being passed through: rgb(300, -5, 0) becomes rgb(255, 0, 0), and alpha is always shown with two decimals. Short forms like #F00, four and eight digit HEX with transparency, and rgba() with a percentage alpha are understood as well. Every result can be copied with one click. Colour names such as tomato are not supported, and colours are not read from images.
So arbeitet der RGB-in-HEX-Konverter
Dieser Konverter rechnet zwischen den Farbnotationen um, die Sie in CSS, HTML und Design-Werkzeuge einfügen. Tippen Sie einen HEX-Wert wie #3366CC, einen RGB-Wert wie rgb(255, 0, 0) oder einen HSL-Wert wie hsl(0, 100%, 50%) in das passende Feld — die anderen beiden werden sofort gefüllt. Mit den Reglern für Rot, Grün, Blau und Alpha bauen Sie eine Farbe von Hand, während Vorschau und Ausgabezeilen mitlaufen. Werte werden begrenzt und gerundet statt einfach durchgereicht: rgb(300, -5, 0) wird zu rgb(255, 0, 0), Alpha erscheint immer mit zwei Dezimalstellen. Kurzformen wie #F00, vier- und achtstellige HEX-Werte mit Transparenz sowie rgba() mit Prozent-Alpha werden ebenfalls verstanden. Jedes Ergebnis lässt sich mit einem Klick kopieren. Farbnamen wie tomato werden nicht unterstützt, und Farben werden nicht aus Bildern ausgelesen.