np-ui-color-pickerdeprecated

Angular 9 Native color picker component.

Usage no npm install needed!

<script type="module">
  import npUiColorPicker from 'https://cdn.skypack.dev/np-ui-color-picker';
</script>

README

np-ui-color-picker

Angular 9 Native color picker component.

Check demo Here

NPM

$ npm install np-ui-color-picker

HTML

<np-ui-color-picker 
    [(ngModel)]="currentColor">
</np-ui-color-picker>

Properties

  1. ngModel : string
    Selected color variable for two way data binding.
  2. disabled : boolean
    Set component is disabled or not.
  3. required : boolean
    Default value is false. add required attribute to input textbox.
  4. defaultOpen : boolean
    Set color picker by default open or not.
  5. colors : string[]
    List of pre defined colors, if not passed this variable, default color list will be displayed.
  6. placeholder : string
    Set placeholder for color picker.
  7. hideColorInput : boolean
    Hide color input box, only show seleced color block.
  8. styleClass : string
    set name of css class.

Apis

  1. getSelectedRGB()
    Get selected color in RGB format.

Methods

  1. onChange()
    On change event binding for component.

Other np-ui components for Angular

  1. Data grid
  2. Date picker
  3. Time picker
  4. Color picker

License

This project is licensed under the MIT License.

Contributors