1 | export type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla';
|
2 | export interface ColorObject {
|
3 | type: ColorFormat;
|
4 | values: [number, number, number] | [number, number, number, number];
|
5 | }
|
6 |
|
7 | export function hexToRgb(hex: string): string;
|
8 | export function rgbToHex(color: string): string;
|
9 | export function hslToRgb(color: string): string;
|
10 | export function decomposeColor(color: string): ColorObject;
|
11 | export function recomposeColor(color: ColorObject): string;
|
12 | export function getContrastRatio(foreground: string, background: string): number;
|
13 | export function getLuminance(color: string): number;
|
14 | export function emphasize(color: string, coefficient?: number): string;
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export function fade(color: string, value: number): string;
|
20 | export function alpha(color: string, value: number): string;
|
21 | export function darken(color: string, coefficient: number): string;
|
22 | export function lighten(color: string, coefficient: number): string;
|