UNPKG

ts-browser-helpers

Version:

A collection of utility classes, functions and decorators for javascript/typescript projects, for use in the browser.

22 lines 794 B
/** * Converts a single color channel from the sRGB color space to linear. * @param c - The color channel to be converted. * @category Color */ export declare function SRGBToLinear(c: number): number; /** * Converts a single color channel from the linear color space to sRGB. * @param c - The color channel to be converted. * @category Color */ export declare function LinearToSRGB(c: number): number; /** * Creates an image data url from a color string. * @param color - color string (css compatible color) * @param width - width of the image (default: 1) * @param height - height of the image (default: 1) * @return data url * @category Color */ export declare function colorToDataUrl(color: string, width?: number, height?: number): string; //# sourceMappingURL=color.d.ts.map