UNPKG

ngx-input-color

Version:

Angular color input component and color picker (with HSL, HSV, RGB, CMYK, HEX, alpha, eye-dropper, etc)

27 lines (26 loc) 899 B
import { CMYK, HSLA, HSVA, RGBA } from './interfaces'; export type ColorInput = string | CMYK | HSLA | HSVA | RGBA | NgxColor; export type OutputType = 'CMYK' | 'HSL' | 'HSV' | 'RGB' | 'HEX'; export declare class NgxColor { private _rgb; private _name; constructor(input?: ColorInput); get isValid(): boolean; name(): Promise<string>; toRgb(): RGBA; toRgbString(): string; toHexString(allowAlpha?: boolean): string; toHsl(): HSLA; toHsv(): HSVA; toCmyk(): CMYK; static cmykToRgba(cmyk: CMYK): RGBA; static rgbToCmyk(rgba: RGBA): CMYK; static rgbToHsla(rgba: RGBA): HSLA; static rgbToHsva(rgba: RGBA): HSVA; static hsvaToRgba(hsva: HSVA): RGBA; static hslaToRgba(hsla: HSLA): RGBA; equals(other?: NgxColor): boolean; isDark(): boolean; isLight(): boolean; getOutputResult(outputType: OutputType): Promise<string>; }