UNPKG

@iplab/ngx-color-picker

Version:
50 lines (49 loc) 1.48 kB
import { Color, ColorString } from './color.class'; import { BehaviorSubject } from 'rxjs'; import { Rgba } from './rgba.class'; import { Hsla } from './hsla.class'; import { Hsva } from './hsva.class'; export declare enum ColorType { hex = "hex", hexa = "hexa", rgba = "rgba", rgb = "rgb", hsla = "hsla", hsl = "hsl", cmyk = "cmyk" } export declare class ColorPickerControl { private modelValue; private initValue; private readonly valueChanged; readonly presetsVisibilityChanges: BehaviorSubject<boolean>; initType: ColorType; readonly alphaChannelVisibilityChanges: BehaviorSubject<boolean>; readonly valueChanges: import("rxjs").Observable<Color>; private colorPresets; constructor(); setValueFrom(color: ColorString | Color | Rgba | Hsla | Hsva): this; get value(): Color; /** * @internal * used for two-way data binding */ set value(value: Color); /** * reset color to initial */ reset(): this; isAlphaChannelEnabled(): boolean; showAlphaChannel(): this; hideAlphaChannel(): this; getColorType(colorString: ColorString): ColorType; setColorPresets(colorPresets: Array<Array<ColorString> | ColorString>): this; get presets(): (Color | Color[])[]; hasPresets(): boolean; isPresetVisible(): boolean; showPresets(): this; hidePresets(): this; private setValue; private finOutInputType; private setPresets; }