Pure Angular Colorpicker Component Library | ngx-color-picker

ngx-color-picker is a component of the Pure Angular color picker library for Angular 5+ applications.

Describe

  • It is an angular color picker
  • Compatible with Angular 5+ versions
  • No external dependency
  • easy to configure
  • easy to use

Tested with

  • Firefox (newer)
  • Chrome (latest)
  • Chromium (latest)
  • Edge
  • IE11

Quick Animated Gradient Border In Pure CSS

How to make use of it:

Installation / Getting Started

npm install @iplab/ngx-color-picker --save

Use the following snippet inside your app module:

import { ColorPickerModule } from '@iplab/ngx-color-picker';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
...
...

@NgModule({
    imports: [
        BrowserModule,
        ColorPickerModule,
        BrowserAnimationsModule // or use NoopAnimationsModule
    ],
    bootstrap: [AppComponent]
})
export class AppModule {}

Use the following snippet inside your template:

<chrome-picker [(color)]="#fff"></chrome-picker>
ColorPickerControl methods
PropertyTypeDescription
setValueFromFunctionSet value from Color, Rgba, Hsla, Hsva or ColorString
valueGetter.valueget value as a Color object
resetFunctionreset value to initial state
valueChangesObservableUsed to observe component value changes
isAlphaChannelEnabledFunctionreturn is alpha changel enabled
showAlphaChannelFunctionshow alpha channel
hideAlphaChannelFunctionhide alpha channel
alphaChannelVisibilityChangesBehaviorSubjectUsed to observe alpha channel changes
setColorPresetsFunctiondefine color preset list
presetsGetter.presetsget color presets
hasPresetsFunctionreturn status of predefined color presets
showPresetsFunctionshow predefined color presets
hidePresetsFunctionhide predefined color presets
presetsVisibilityChangesBehaviorSubjectUsed to observe color preset visibility
Color methods
PropertyTypeDescription
Color.fromstatic methodcreate a new Color object from Color, Rgba, Hsla, Hsva or ColorString
cloneFunctioncreate a new Color object
setFromStringFunctionchange the value by providing the string
setHsvaFunctionchange the value by providing HSV values
setRgbaFunctionchange the value by providing RGB values
setHslaFunctionchange the value by providing HSL values
toHexStringFunctionconvert Color object to hex string
toRgbStringFunctionconvert Color object to rgb string
toRgbaStringFunctionconvert Color object to rgba string
toHslStringFunctionconvert Color object to hsl string
toHslaStringFunctionconvert Color object to hsla string
toHsvStringFunctionconvert Color object to hsv string
toHsvaStringFunctionconvert Color object to hsva string
toCmykStringFunctionconvert Color object to cmyk string
getHsvaFunctionreturn Hsva object
getRgbaFunctionreturn Rgba object
getHslaFunctionreturn Hsla object
getCmykFunctionreturn Cmyk object

Configurable Color Picker, ngx-color-picker Plugin/Github, jquery color picker example


See Demo And Download

Official Website(pIvan): Click Here

This superior jQuery/javascript plugin is developed by pIvan. For extra Advanced Usage, please go to the official website.

Related Posts

Data-Table-Generator-Tabulator

Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…

alert-confirm-prompt-attention-js

Simple Alert, Confirm, Prompt Popup Using Vanilla JavaScript Library | attention.js

JavaScript provides various built-in functionality to display popup messages for different purposes. Attention JS is a vanillaJS plugin used to create a custom alert, confirm, or Prompt…

Bootstrap-4-Toast-Notification-Plugin

Lightweight Bootstrap 4 Toast Notification Plugin | BS4 Advanced Toast

A lightweight Bootstrap 4 Toast Notification plugin integrated with JS/jQuery. bs4-toast.js is a JavaScript library that enhances the native Bootstrap toast component with icons, buttons, callbacks, and…

Audio-Visualizations-Wave

How to Create Audio Visualizations with JavaScript | Wave.js

Audio Visualizer Library – wave.js is a vanilla javascript audio visualization library that provides 20+ creative audio visualization effects to bring more engagement to your visitor. Contribute…

swiper-touch-slider

Modern Mobile Touch Slider With Acceleration Transitions | Swiper

Swiper is the most modern free mobile touch slider with accelerated device transitions and amazing original behavior. It is intended for use in mobile websites, mobile web…

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

Leave a Reply

Your email address will not be published. Required fields are marked *