ngx-colors
Advanced tools
Comparing version 3.5.3 to 3.6.0
@@ -53,2 +53,4 @@ import { EventEmitter } from '@angular/core'; | ||
constructor(c: number, m: number, y: number, k: number, a?: number); | ||
denormalize(): Cmyk; | ||
toString(): string; | ||
} |
@@ -27,4 +27,11 @@ import { OnInit, ChangeDetectorRef, ElementRef } from '@angular/core'; | ||
variants: any[]; | ||
userFormats: string[]; | ||
colorFormats: string[]; | ||
format: ColorFormats; | ||
formatMap: { | ||
hex: ColorFormats; | ||
rgba: ColorFormats; | ||
hsla: ColorFormats; | ||
cmyk: ColorFormats; | ||
}; | ||
canChangeFormat: boolean; | ||
@@ -49,3 +56,3 @@ menu: number; | ||
private findIndexSelectedColor; | ||
iniciate(triggerInstance: NgxColorsTriggerDirective, triggerElementRef: any, color: any, palette: any, animation: any, format: string, hideTextInput: boolean, hideColorPicker: boolean, acceptLabel: string, cancelLabel: string, colorPickerControls: 'default' | 'only-alpha' | 'no-alpha', position: 'top' | 'bottom'): void; | ||
iniciate(triggerInstance: NgxColorsTriggerDirective, triggerElementRef: any, color: any, palette: any, animation: any, format: string, hideTextInput: boolean, hideColorPicker: boolean, acceptLabel: string, cancelLabel: string, colorPickerControls: 'default' | 'only-alpha' | 'no-alpha', position: 'top' | 'bottom', userFormats?: string[]): void; | ||
setPosition(): void; | ||
@@ -67,3 +74,3 @@ private setPositionY; | ||
changeColorManual(color: string): void; | ||
setColor(value: Hsva): void; | ||
setColor(value: Hsva, colorIndex?: number): void; | ||
setPreviewColor(value: Hsva): void; | ||
@@ -70,0 +77,0 @@ hsvaToRgba: any; |
@@ -16,2 +16,3 @@ import { EventEmitter, ElementRef, ComponentRef, OnDestroy } from '@angular/core'; | ||
format: string; | ||
formats: string[]; | ||
position: 'top' | 'bottom'; | ||
@@ -40,11 +41,11 @@ hideTextInput: boolean; | ||
setDisabledState(isDisabled: boolean): void; | ||
setColor(color: any): void; | ||
setColor(color: any, previewColor?: string): void; | ||
sliderChange(color: any): void; | ||
get value(): string; | ||
set value(value: string); | ||
writeValue(value: any): void; | ||
writeValue(value: any, previewColor?: string): void; | ||
registerOnChange(fn: any): void; | ||
registerOnTouched(fn: any): void; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<NgxColorsTriggerDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxColorsTriggerDirective, "[ngx-colors-trigger]", never, { "colorsAnimation": "colorsAnimation"; "palette": "palette"; "format": "format"; "position": "position"; "hideTextInput": "hideTextInput"; "hideColorPicker": "hideColorPicker"; "attachTo": "attachTo"; "overlayClassName": "overlayClassName"; "colorPickerControls": "colorPickerControls"; "acceptLabel": "acceptLabel"; "cancelLabel": "cancelLabel"; }, { "change": "change"; "input": "input"; "slider": "slider"; "close": "close"; "open": "open"; }, never, never, false, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxColorsTriggerDirective, "[ngx-colors-trigger]", never, { "colorsAnimation": "colorsAnimation"; "palette": "palette"; "format": "format"; "formats": "formats"; "position": "position"; "hideTextInput": "hideTextInput"; "hideColorPicker": "hideColorPicker"; "attachTo": "attachTo"; "overlayClassName": "overlayClassName"; "colorPickerControls": "colorPickerControls"; "acceptLabel": "acceptLabel"; "cancelLabel": "cancelLabel"; }, { "change": "change"; "input": "input"; "slider": "slider"; "close": "close"; "open": "open"; }, never, never, false, never>; | ||
} |
@@ -13,2 +13,3 @@ import { Cmyk, Rgba, Hsla, Hsva } from "../clases/formats"; | ||
rgbaToCmyk(rgba: Rgba): Cmyk; | ||
hsvaToCmyk(hsva: Hsva): Cmyk; | ||
rgbaToHsva(rgba: Rgba): Hsva; | ||
@@ -15,0 +16,0 @@ rgbaToHex(rgba: Rgba, allowHex8?: boolean): string; |
{ | ||
"name": "ngx-colors", | ||
"version": "3.5.3", | ||
"version": "3.6.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A beautiful color picker for angular that let you choose from a color palette, using sliders (Hue, Lightness, Alpha sliders) or through text input(hex, rgba, hsla)", |
@@ -61,5 +61,28 @@ ![size](https://img.shields.io/bundlephobia/min/ngx-colors?style=for-the-badge) | ||
```html | ||
<ngx-colors ngx-colors-trigger [(ngModel)]="color"></ngx-colors> | ||
<ngx-colors | ||
ngx-colors-trigger | ||
[(ngModel)]="color" | ||
></ngx-colors> | ||
``` | ||
You can select just one format: | ||
```html | ||
<ngx-colors | ||
ngx-colors-trigger | ||
[(ngModel)]="color" | ||
[format] = "'hex'" | ||
></ngx-colors> | ||
``` | ||
Or you can choise some formats | ||
```html | ||
<ngx-colors | ||
ngx-colors-trigger | ||
[(ngModel)]="color" | ||
[formats]="['hex','cmyk']" | ||
></ngx-colors> | ||
``` | ||
##### Or with Reactive Forms: | ||
@@ -66,0 +89,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
760451
45
4621
98