AbraCalc

Hex to Normalized RGB Converter

Convert a hex color to normalized RGB float values (0.0–1.0) for use in WebGL, GLSL shaders, and 3D graphics.

Embed this tool on your site

How to use this tool

  1. Enter a hex color (e.g. #3a86ff).
  2. Each channel is divided by 255 to produce a float in [0.0, 1.0].
  3. Paste the vec3() output directly into your GLSL shader code.

WebGL, GLSL shaders, and many 3D APIs expect RGB as floats in [0, 1]. Enter a hex color and get the normalized vec3 representation instantly.

Frequently asked questions

Why does WebGL use 0–1 range?
OpenGL and WebGL work in normalized device coordinates throughout. Using 0–1 for color components is consistent with this design and avoids integer overflow.
What is a GLSL vec3?
A GLSL vec3 is a three-component floating-point vector. In shaders, vec3(r,g,b) represents an RGB color.

References & sources