Skip to content

ColorGenerator generator

Generate color values in different formats.

Why: Use ColorGenerator for UI, catalogue, or theme fixtures that need syntactically valid color values; use a constant when brand colors are fixed requirements.

Category: core.

Output: str.

1
<key name="value" generator="ColorGenerator(format_type='hex')"/>

Parameters

  • format_type: str; Default hex — Output representation: hexadecimal, RGB, or named color.