@pbroom/color-kit/driverColor input
ParseColorInputExpressionOptions
Options for parseColorInputExpression.
import type { ParseColorInputExpressionOptions } from '@pbroom/color-kit/driver';color-input-parser.ts:2interface ParseColorInputExpressionOptions {
currentValue: number;
range: [number, number];
allowExpressions?: boolean;
}Properties
- currentValue
number - Current channel value: the left operand when an expression starts with an operator (
+10,*2). - range
[number, number] - Channel range
[min, max]. An absolute%number is a position in it (range[0] + p * span); a relative one is a fraction of its span. - allowExpressions?
booleandefaultfalse - Accept arithmetic (
+ - * /, parentheses) and relative input. Whenfalse, only a single number is accepted.