मुख्य सामग्री पर जाएँ
Tools Star Hub

Hex से RGB

3, 6 और 8 अंकों वाले hex रंगों को अपने ब्राउज़र में RGB, RGBA और HSL में बदलें।

टूल लोड हो रहा है…

यह टूल आपके ब्राउज़र में चलता है। इनपुट, फ़ाइलें और बनाए गए मान इसी डिवाइस पर रहते हैं। पसंदीदा और हाल में इस्तेमाल किए गए टूल, अगर आप इनका उपयोग करते हैं, लोकल स्टोरेज में केवल टूल के नाम सहेजते हैं — कभी पासवर्ड, दस्तावेज़ या QR सामग्री नहीं। गोपनीयता नीति देखें।

इस टूल की विस्तृत गाइड (इस्तेमाल का तरीका, उदाहरण और अक्सर पूछे जाने वाले सवाल) फ़िलहाल अंग्रेज़ी में है।

What this tool does

Type a 3-digit, 6-digit, or 8-digit hex color and see RGB and HSL. Designers copying a color from CSS use it when they have a hex value and need the other writings. #336699 is rgb(51, 102, 153), and a word such as red is not accepted.

How to use

  1. Type a hex color, with or without #. 3-digit, 6-digit and 8-digit values are accepted.
  2. RGB, RGBA (when alpha is present), normalized HEX and HSL appear automatically.
  3. Copy any format, try an example, or reset the field.

Examples

  • #336699

    rgb(51, 102, 153). HSL is hsl(210, 50%, 40%).

  • #fff

    3-digit hex expands to #ffffff, which is rgb(255, 255, 255).

  • #336699cc

    8-digit hex includes alpha. The extra pair is about 80% opacity, shown as RGBA.

How it works

HEX writes red, green and blue as base-16 pairs. A 3-digit value doubles each digit. An 8-digit value adds an alpha pair. RGB uses 0–255 per channel. HSL describes the same color as hue, saturation and lightness. Conversion is arithmetic in the browser; it does not call a color API.

Limitations

Only 3-digit, 6-digit, and 8-digit hex is accepted, with or without #. A word such as red, or an rgb() string, is not converted. HSL on the page is calculated from that hex. It is not a second field you can edit.

See the disclaimer for what these tools do not cover.

FAQ

Is the Hex to RGB converter free?
Yes. Converting hex to RGB and HSL is free, and no account is required.
Do I need the #?
No. FFFFFF and #FFFFFF are treated the same.
Is my input sent to a server?
No. The hex string is converted in this tab. It is not sent to a server or saved in local storage.
How do I convert a hex color to RGB?
Split the six digits into three pairs and convert each pair from hexadecimal to a number from 0 to 255. #FF8000 is red 255, green 128, blue 0.
What does an 8-digit hex color mean?
The last two digits are the alpha channel, which sets opacity. #FF000080 is red at about 50% opacity.