Color Code Converter (HEX to RGB)

Convert CSS color codes between HEX and RGB formats with an instant visual swatch preview.

The Color Code Converter translates hexadecimal (HEX) color codes into their corresponding Red, Green, Blue (RGB) integer values.

Free, runs in your browser. Nothing you enter is uploaded.

How to use it

  1. Paste or type a HEX color code (like #FF5733) into the input.
  2. View the resulting RGB value and the visual color swatch preview.
  3. Click copy to instantly grab the RGB value for your CSS.

What you enter

What you get

Formula

Base-16 to Base-10 Integer Conversion

Parses the 6-character hexadecimal string into three separate base-10 integers representing the red, green, and blue color channels.

Example: Converting Tailwind Blue-500

Input: #3B82F6

Result: rgb(59, 130, 246)

Provides the exact CSS equivalent for rgba/rgb property usage.

Questions

Does it support 3-digit HEX codes?

Yes, 3-digit codes like #FFF are automatically expanded and converted to rgb(255, 255, 255).

Limitations

More Developer Utilities

All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.