Skip to content

Function: applyColorTransforms() ​

applyColorTransforms(baseHex, transforms): EffectiveColor

Apply an ordered list of DrawingML colour transforms to a base sRGB hex, returning the effective sRGB hex (and opacity, when an alpha* modifier set it). Pure: no DOM, no theme lookup — the caller has already resolved the base colour and extracted each modifier's { name, value }.

An unparseable base hex is returned unchanged (with no transforms applied); an unparseable/null modifier value is skipped.

Parameters ​

ParameterType
baseHexstring
transformsColorTransform[]

Returns ​

EffectiveColor