July 2017
Intermediate to advanced
384 pages
8h 23m
English
ColorPicker is a graphical user interface input widget used to select colors from a two-dimensional square box. The component uses the ngModel directive for two-way value binding. Basically, it supports three kinds of color formats such as hex, RGB, and HSB with a hex default type. The color format is denoted with the format attribute, for example, as format="rgb". ColorPicker is an editable component and can be used in model-driven forms as well. A basic example would be as follows:
<p-colorPicker [(ngModel)]="color1"></p-colorPicker>
The component has to define the string type color property for default hex values, whereas the color property should be object type for RGB and HSB formats as shown here: ...
Read now
Unlock full access