Gathering detailed insights and metrics for ngx-color-picker
Gathering detailed insights and metrics for ngx-color-picker
Gathering detailed insights and metrics for ngx-color-picker
Gathering detailed insights and metrics for ngx-color-picker
ngx-color
A Collection of Color Pickers from Sketch, Photoshop, Chrome & more
@iplab/ngx-color-picker
> Pure Angular color picker library.
ngx-colors
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)
@angular-material-components/color-picker
Angular Material Color Picker
Color picker widget for the Angular (version 2 and newer)
npm install ngx-color-picker
Typescript
Module System
Node Version
NPM Version
96.6
Supply Chain
99.6
Quality
85.6
Maintenance
100
Vulnerability
100
License
Maintenance release 20.0.0
Updated on Jun 20, 2025
Maintenance release 19.0.0
Updated on Mar 09, 2025
Maintenance release 18.0.0
Updated on Mar 09, 2025
Maintenance release 17.0.0
Updated on Jul 07, 2024
Maintenance release 16.0.0
Updated on Nov 26, 2023
Maintenance release 15.0.0
Updated on Sep 20, 2023
TypeScript (49.84%)
HTML (27.59%)
CSS (22.43%)
JavaScript (0.14%)
Total Downloads
38,516,264
Last Day
4,752
Last Week
168,150
Last Month
719,404
Last Year
8,352,210
MIT License
469 Stars
389 Commits
147 Forks
19 Watchers
2 Branches
37 Contributors
Updated on Jun 21, 2025
Minified
Minified + Gzipped
Latest Version
20.0.0
Package Id
ngx-color-picker@20.0.0
Unpacked Size
288.83 kB
Size
76.55 kB
File Count
5
NPM Version
11.4.2
Node Version
22.14.0
Published on
Jun 20, 2025
Cumulative downloads
Total Downloads
Last Day
12.3%
4,752
Compared to previous day
Last Week
-4.8%
168,150
Compared to previous week
Last Month
0.8%
719,404
Compared to previous month
Last Year
15.8%
8,352,210
Compared to previous year
1
3
This is a simple color picker based on the cool angular2-color-picker by Alberplz.
This documentation is for the latest 5/6.x.x version which requires Angular 5 or newer. For Angular 4 you need to use the latest 4.x.x version. Documentation for the 4.x.x can be found from here.
Example application | StackBlitz example
1npm install 2npm run build
1npm install 2npm run start
1npm install ngx-color-picker --save
1import { ColorPickerModule } from 'ngx-color-picker'; 2 3@NgModule({ 4 ... 5 imports: [ 6 ... 7 ColorPickerModule 8 ] 9})
1<input [(colorPicker)]="color" [style.background]="color"/>
1[colorPicker] // The color to show in the color picker dialog. 2 3[cpWidth] // Use this option to set color picker dialog width ('230px'). 4[cpHeight] // Use this option to force color picker dialog height ('auto'). 5 6[cpToggle] // Sets the default open / close state of the color picker (false). 7[cpDisabled] // Disables opening of the color picker dialog via toggle / events. 8 9[cpColorMode] // Dialog color mode: 'color', 'grayscale', 'presets' ('color'). 10 11[cpCmykEnabled] // Enables CMYK input format and color change event (false). 12 13[cpOutputFormat] // Output color format: 'auto', 'hex', 'rgba', 'hsla' ('auto'). 14[cpAlphaChannel] // Alpha mode: 'enabled', 'disabled', 'always', 'forced' ('enabled'). 15 16[cpFallbackColor] // Used when the color is not well-formed or is undefined ('#000'). 17 18[cpPosition] // Dialog position: 'auto', 'top', 'bottom', 'left', 'right', 19 // 'top-left', 'top-right', 'bottom-left', 'bottom-right' ('auto'). 20[cpPositionOffset] // Dialog offset percentage relative to the directive element (0%). 21[cpPositionRelativeToArrow] // Dialog position is calculated relative to dialog arrow (false). 22 23[cpPresetLabel] // Label text for the preset colors if any provided ('Preset colors'). 24[cpPresetColors] // Array of preset colors to show in the color picker dialog ([]). 25 26[cpDisableInput] // Disables / hides the color input field from the dialog (false). 27 28[cpDialogDisplay] // Dialog positioning mode: 'popup', 'inline' ('popup'). 29 // popup: dialog is shown as popup (fixed positioning). 30 // inline: dialog is shown permanently (static positioning). 31 32[cpIgnoredElements] // Array of HTML elements that will be ignored when clicked ([]). 33 34[cpSaveClickOutside] // Save currently selected color when user clicks outside (true). 35[cpCloseClickOutside] // Close the color picker dialog when user clicks outside (true). 36 37[cpOKButton] // Show an OK / Apply button which saves the color (false). 38[cpOKButtonText] // Button label text shown inside the OK / Apply button ('OK'). 39[cpOKButtonClass] // Additional class for customizing the OK / Apply button (''). 40 41[cpCancelButton] // Show a Cancel / Reset button which resets the color (false). 42[cpCancelButtonText] // Button label text shown inside the Cancel / Reset button ('Cancel'). 43[cpCancelButtonClass] // Additional class for customizing the Cancel / Reset button (''). 44 45[cpAddColorButton] // Show an Add Color button which add the color into preset (false). 46[cpAddColorButtonText] // Button label text shown inside the Add Color button ('Add color'). 47[cpAddColorButtonClass] // Additional class for customizing the Add Color button (''). 48 49[cpRemoveColorButtonClass] // Additional class for customizing the Remove Color button (''). 50 51[cpPresetColorsClass] // Additional class for customizing the Preset Colors container (''). 52 53[cpMaxPresetColorsLength] // Use this option to set the max colors allowed in presets (null). 54 55[cpPresetEmptyMessage] // Message for empty colors if any provided used ('No colors added'). 56[cpPresetEmptyMessageClass] // Additional class for customizing the empty colors message (''). 57 58[cpUseRootViewContainer] // Create dialog component in the root view container (false). 59 // Note: The root component needs to have public viewContainerRef. 60 61(colorPickerOpen) // Current color value, send when dialog is opened (value: string). 62(colorPickerClose) // Current color value, send when dialog is closed (value: string). 63 64(colorPickerChange) // Changed color value, send when color is changed (value: string). 65(colorPickerCancel) // Color select canceled, send when Cancel button is pressed (void). 66(colorPickerSelect) // Selected color value, send when OK button is pressed (value: string). 67 68(cpToggleChange) // Status of the dialog, send when dialog is opened / closed (open: boolean). 69 70(cpInputChange) // Input name and its value, send when user changes color through inputs 71 // ({input: string, value: number | string, color: string}) 72 73(cpSliderChange) // Slider name and its value, send when user changes color through slider 74 // ({slider: string, value: number | string, color: string}) 75(cpSliderDragStart) // Slider name and current color, send when slider dragging starts (mousedown,touchstart) 76 // ({slider: string, color: string}) 77(cpSliderDragEnd) // Slider name and current color, send when slider dragging ends (mouseup,touchend) 78 // ({slider: string, color: string}) 79 80(cpCmykColorChange) // Outputs the color as CMYK string if CMYK is enabled (value: string). 81 82(cpPresetColorsChange) // Preset colors, send when 'Add Color' button is pressed (value: array).
1openDialog() // Opens the color picker dialog if not already open. 2closeDialog() // Closes the color picker dialog if not already closed.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
8 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 6
Reason
5 existing vulnerabilities detected
Details
Reason
Found 8/28 approved changesets -- score normalized to 2
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More