@chayns/colors
Version:
JavaScript utility functions for the calculation of colors for chayns
15 lines (14 loc) • 981 B
TypeScript
import type { RGB1, RGB255, RGBA1, RGBA255 } from '../types/rgb';
import type { HSL, HSLA } from '../types/hsl';
import type { HSV, HSVA } from '../types/hsv';
export declare function isString(value: unknown): value is string;
export declare function isNumber(value: unknown): value is number;
export declare function isNullOrUndefined(value: unknown): value is (null | undefined);
export declare function isObject(value: unknown): value is Record<string | number | symbol, unknown>;
export declare function isInInterval(value: unknown, min: number, max: number): boolean;
export declare function isHex(value: string): boolean;
export declare function isRgbString(value: string): boolean;
export declare function isRgb255(value: unknown): value is (RGB255 | RGBA255);
export declare function isRgb1(value: unknown): value is (RGB1 | RGBA1);
export declare function isHsl(value: unknown): value is (HSL | HSLA);
export declare function isHsv(value: unknown): value is (HSV | HSVA);