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
@iplab/ngx-color-picker
> Pure Angular color picker library.
ngx-color
A Collection of Color Pickers from Sketch, Photoshop, Chrome & more
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
95.8
Supply Chain
97.2
Quality
82.3
Maintenance
100
Vulnerability
100
License
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
Maintenance release
Updated on Feb 26, 2023
TypeScript (49.45%)
HTML (27.81%)
CSS (22.6%)
JavaScript (0.14%)
Total Downloads
37,677,974
Last Day
4,585
Last Week
157,589
Last Month
699,296
Last Year
8,214,112
MIT License
466 Stars
381 Commits
147 Forks
19 Watchers
3 Branches
35 Contributors
Updated on Apr 19, 2025
Minified
Minified + Gzipped
Latest Version
19.0.0
Package Id
ngx-color-picker@19.0.0
Unpacked Size
289.29 kB
Size
77.47 kB
File Count
12
NPM Version
11.2.0
Node Version
22.14.0
Published on
Mar 09, 2025
Cumulative downloads
Total Downloads
Last Day
40.3%
4,585
Compared to previous day
Last Week
1.6%
157,589
Compared to previous week
Last Month
-14.2%
699,296
Compared to previous month
Last Year
13.6%
8,214,112
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
13 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
Found 10/28 approved changesets -- score normalized to 3
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
Reason
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-04-14
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