🧪 Mixes two colors together.
Syntax
TypeScript
import { colorMix } from '@opentf/std'; colorMix(color1: any, color2: any, weight?: number, format?: ColorFormat): any
weight: The weight of the first color between0and1(default:0.5).format: The output format (default:'hex').
Examples
TypeScript
colorMix('white', 'black'); //=> '#808080' colorMix('red', 'blue'); //=> '#800080' colorMix('red', 'blue', 0.25); //=> '#4000bf'