blockly > utils > colour > blend
utils.colour.blend() function
Blend two colours together, using the specified factor to indicate the weight given to the first colour.
Signature:
export declare function blend(colour1: string, colour2: string, factor: number): string | null;
Parameters
Parameter | Type | Description |
---|---|---|
colour1 | string | First colour. |
colour2 | string | Second colour. |
factor | number | The weight to be given to colour1 over colour2. Values should be in the range [0, 1]. |
Returns:
string | null
Combined colour represented in hex.