JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q60901F
  • License MIT

Package Exports

  • ngx-color-palette
  • ngx-color-palette/package.json

Readme

Color picker

ngx-color-palette npm version

Angular library which provides color picker functionality to your angular application.



Import

Import the module on your app.module.ts file as follow.

import { NgxColorPaletteModule } from 'ngx-color-palette';

Then import the module as follow on imports array

NgxColorPaletteModule

Integration

<ngx-color-palette [color]="'red'" (currentColor)="currentColor($event)"></ngx-color-palette>

on .html

<ngx-color-palette  [color]="color" [squared]="false" (currentColor)="currentColor($event)"></ngx-color-palette>

on .ts

color = '#FBC02D'; // any color value (name / hex / rgb / hsl)

public currentColor(event: any) { // to receive output
  this.color = event.color;
}
Field type Info
color string Variable to bind
squared boolean Non-rounded egdes
currentColor event / method to get changed / emitted value

Code integration

To use this package as a service npm i ngx-color-palette install this on the root angular project .

Note: Don't forget to run this commend npm i ngx-color-palette on root folder or else it will throw error.