Hex.LinearTheme¶
Creates a linear gradient variant of a hex color
| Parameter | Type | Required | Description |
|---|---|---|---|
| hexColor | STRING | The base hex color (e.g., "#01B8AA") | |
| variant | INT64 | The variant index (1-N, wraps around if exceeds steps) | |
| steps | INT64 | The number of steps in the gradient (minimum = 2) | |
| linearRange | DOUBLE | The range of luminance adjustment |
STRING Gradient variant color in hex format
function 'EvaluationContext.Colour.Hex.LinearTheme' =
(
hexColor: STRING,
variant: INT64,
steps: INT64,
linearRange: DOUBLE
) =>
VAR StepSize = linearRange / ( steps - 1 )
VAR AdjustedVariant = MOD( variant - 1, steps ) + 1
VAR Hex =
EvaluationContext.Colour.Hex.AdjustLuminance(
hexColor,
( (AdjustedVariant - 1) * StepSize ) - ( linearRange / 2 )
)
RETURN Hex