jc-color
Version:
A JavaScript tool for color compute and console print tool both for NodeJS and Browser.
16 lines (15 loc) • 995 B
TypeScript
import { ColorNames, RgbColorChannels } from "../types";
declare function hex3ToChannels(val: string): RgbColorChannels | null;
declare function hex6ToChannels(val: string): RgbColorChannels | null;
declare function rgbToChannels(val: string, strct?: boolean): RgbColorChannels;
declare function hexToChannels(val: string, strct?: boolean): RgbColorChannels;
declare function hslToChannels(val: string): RgbColorChannels;
declare function colorToChannel(color: string | RgbColorChannels, strict?: boolean): RgbColorChannels;
declare function colorsToChannels(...colors: (string | RgbColorChannels)[]): RgbColorChannels[];
declare function stringColorToChannels(val: ColorNames | RgbColorChannels | string): RgbColorChannels;
declare function hslToRgbChannels(val: string): {
red: number;
green: number;
blue: number;
};
export { hex3ToChannels, hex6ToChannels, hexToChannels, rgbToChannels, hslToChannels, colorToChannel, colorsToChannels, stringColorToChannels, hslToRgbChannels };