import RandomGenerator from './RandomGenerator'; export type ColorName = 'red' | 'green' | 'blue' | 'yellow' | 'orange' | 'purple' | 'pink' | 'black' | 'white' | 'gray' | 'brown'; export default class Color { r: number; g: number; b: number; a: number; static fromName(name: ColorName): Color; static fromRGB(r: number, g: number, b: number, a?: number): Color; static fromHex(hex: string): Color; static random(rng: RandomGenerator): Color; toRGB(): string; toHex(): string; /** * Returns a new color that is the result of blending this color with another color. */ blend(color: Color, amount: number): Color; /** * Lightens a color by a given percentage. */ lighten(amount: number): Color; /** * Darkens a color by a given percentage. */ darken(amount: number): Color; setOpacity(a: number): Color; }