GAME COLOR CONVERTER

Convert color codes seamlessly between HEX, RGB (0-255), HSL, and normalized Unity C# Color(r,g,b,a) float values (0.0 to 1.0).

COLOR INPUTS

QUICK PALETTES:

CONVERTED OUTPUTS

UNITY C# COLOR (0.0 - 1.0f)
new Color(0.000f, 0.898f, 1.000f, 1.000f)
UNITY C# COLOR32 (0 - 255)
new Color32(0, 229, 255, 255)
HEX STRING
#00E5FF
CSS RGB
rgb(0, 229, 255)
CSS HSL
hsl(186, 100%, 50%)

How Unity Color Conversion Works

In Unity C#, the standard UnityEngine.Color struct stores Red, Green, Blue, and Alpha components as normalized 32-bit floating-point values ranging from 0.0f to 1.0f, rather than standard web integers (0 to 255).

C# Normalized Color Formula
float normalizedRed = 229f / 255f; // Results in ~0.898f
Color customColor = new Color(0.0f, 0.898f, 1.0f, 1.0f);

Alternatively, Unity provides Color32 which uses 8-bit unsigned bytes (byte r, byte g, byte b, byte a) from 0 to 255 for lower memory overhead in mesh vertex colors and sprite shaders.