Color ToolsBrowser-based calculationInstant output

RGB to HEX Color Converter

When your brand guidelines or desktop design inspector list colors as Red, Green, and Blue values between 0 and 255, this converter translates them into standard 6-digit hexadecimal notation (#RRGGBB) for web, SVG, and UI design.

RGB Channel Values (0–255)

Enter Red, Green, and Blue integers between 0 and 255.

HEX Color Code
#1E3A8A

CSS RGB: rgb(30, 58, 138)

Uppercase HEX
#1E3A8A
Lowercase HEX
#1e3a8a
CSS rgb()
rgb(30, 58, 138)

Decimal (Base-10) to Hexadecimal (Base-16) Formula

Hex Pair = floor(Channel ÷ 16) followed by (Channel mod 16) in Base-16 (0–9, A–F)

Each 0–255 integer channel is divided by 16 to find the high nibble and remainder (low nibble), then formatted as a two-character hexadecimal pair.

How to Use This Calculator

  1. Enter integer values between 0 and 255 for Red (R), Green (G), and Blue (B).
  2. Inspect the live color preview and uppercase/lowercase HEX codes.
  3. Copy the #RRGGBB value with one click.

Worked Example: Converting rgb(239, 68, 68) to HEX

You want the HEX code for an alert crimson color with R=239, G=68, B=68.

1. Red (239): 239 ÷ 16 = 14 (E) remainder 15 (F) → EF
2. Green (68): 68 ÷ 16 = 4 remainder 4 → 44
3. Blue (68): 68 ÷ 16 = 4 remainder 4 → 44
Final Output: #EF4444

When Designers Use the RGB to HEX Converter

Used when building cross-media brand palettes that document both RGB values for office/presentation software and HEX codes for digital products.

Practical Prepress & Design Advice

  • • Always pad single-digit hex values with a leading zero (e.g., decimal 10 is 0A, not A) so the final string has exactly 6 hexadecimal characters.

Common Mistakes to Avoid

  • • Entering values outside the 0–255 8-bit integer range (such as CMYK percentages 0–100).

RGB to HEX Converter – Frequently Asked Questions

Standard 8-bit color channels allocate 8 binary bits (1 byte) per color channel, which provides 2⁸ = 256 possible intensity levels, numbered from 0 to 255.

No. #1E293B and #1e293b are identical in all browsers and design software, though uppercase is preferred in brand style guides for visual uniformity.

Whenever Red, Green, and Blue have the exact same value (such as R:128, G:128, B:128 → #808080), the resulting color is an achromatic neutral gray.

Related Print & Design Calculators

View all 40 tools →
Color Tools

HEX to RGB Converter

Convert 3-digit or 6-digit hexadecimal color codes (#RRGGBB) into RGB values (0–255) and CSS syntax.

Color Tools

RGB to CMYK Converter

Calculate estimated Cyan, Magenta, Yellow, and Key (Black) percentages and Total Ink Coverage from RGB.

Color Tools

Color Contrast Checker

Calculate WCAG 2.1 contrast ratio between foreground text and background colors for AA and AAA legibility.

Color Tools

HEX Color Mixer

Blend any two HEX colors and generate intermediate 10%, 25%, 50%, 75%, and 90% color swatches.

Connected Print & Prepress Entities for RGB to HEX Converter

Explore related mathematical concepts, ISO standards, and prepress calculators.

Color Tools Hub →

Subtractive four-color process printing model using Cyan, Magenta, Yellow, and Key (Black) inks.

Six-digit hexadecimal representation of sRGB color channels used in CSS, SVG, and UI design.

Relative luminance ratio (1:1 to 21:1) governing accessible text legibility under WCAG 2.1 AA and AAA.

Additive digital light model combining Red, Green, and Blue channels from 0 to 255.