KitBench

HEX to RGB Converter

Decode 3-digit or 6-digit HEX colors into exact R, G, B integers, normalized 0-1 floats, CSS rgb(), and HSL.

Privacy Notice: Runs locally in your browser without uploading files to external servers or requiring an account.

Interactive Browser Workspace

Loading the interactive HEX to RGB Converter workspace. Enable JavaScript in your browser to run calculations and conversions locally.

How to Use HEX to RGB Converter

  1. Enter any 3-digit or 6-digit HEX code (with or without `#`).
  2. Copy `rgb(r, g, b)`, individual channels, normalized `0..1` shader floats, or HSL.

Methodology & Accuracy

Parses base-16 channel pairs into 8-bit integers (0-255) and derives normalized 0-1 floats and HSL coordinates.

Examples

  • `#10B981` decodes to `rgb(16, 185, 129)` and `0.063, 0.725, 0.506`.

Scope & Limitations

  • Supports opaque 3-digit and 6-digit sRGB HEX codes.

Frequently Asked Questions

Why include 0 to 1 normalized floats?

WebGL, Three.js, SwiftUI, and design shader pipelines use 0.0 to 1.0 RGB channel values.

Related Tools

  • RGB to HEX Converter - Convert Red, Green, and Blue (0 to 255) channel values to HEX and HSL, or decode HEX to RGB.
  • HSL & HSV Color Converter - Adjust Hue, Saturation, and Lightness interactively and convert cleanly between HSL, HSV, RGB, and HEX.
  • CMYK to RGB & HEX Converter - Convert between sRGB HEX/RGB and approximate CMYK print ink percentages (Cyan, Magenta, Yellow, Key/Black).