Hex to RGB

Paste a hex code straight from your brand guide or design tool and get the exact colour in After Effects.

Expression Code
// Hex to RGB
// Apply to Fill Color (shape or text) or any Color property
hex = "#FF6B35"; // Paste your hex code, with or without the #
alpha = 1; // Completes AE's four-value colour format
h = hex.charAt(0) == "#" ? hex.substr(1) : hex;
r = parseInt(h.substr(0, 2), 16) / 255;
g = parseInt(h.substr(2, 2), 16) / 255;
b = parseInt(h.substr(4, 2), 16) / 255;
[r, g, b, alpha];
Apply to a Fill Color property, then replace the hex string with your colour — copied straight from Figma, a brand PDF, or a website. The expression converts each pair of hex digits to After Effects' 0–1 colour range. Use the full six-digit form (FF6B35), not the three-digit shorthand.
Back to Colour & Style