HexToRGBA Converter is an After Effects script that converts a hex color value into an RGBA array. It’s designed to make it easier for motion designers and animators to quickly translate hex codes (commonly used in design tools like Figma, Sketch, or web CSS) into normalized RGBA values for After Effects expressions and effects.
Created by: Victoria Shelest Year: 2024
The script looks for a text layer named hexValue in the active composition. It reads the hex color string from that layer, converts it into an RGBA array with normalized values between 0 and 1, and then displays the result in a prompt window for easy copy-paste into expressions.
- An RGBA array in the format
[R, G, B, A], where each channel is normalized (0–1). - A prompt window showing the converted array, ready to copy and use in expressions.
- Alpha is always set to
1.
- Copy
hex_to_rgba.jsxto your After Effects Scripts folder:
- Windows:
C:\Program Files\Adobe\Adobe After Effects [version]\Support Files\Scripts\ - Mac:
/Applications/Adobe After Effects [version]/Scripts/
- Restart After Effects.
- Access via File > Scripts > HexToRGBA Converter.
- Enable Script File Access: go to Edit > Preferences > Scripting & Expressions and check Allow Scripts to Write Files and Access Network.
- Create or open a composition and add a text layer named
hexValue. - Type a hex color value into the text layer (for example:
#FF6600). - Run the script. A prompt window will appear with the converted RGBA array.