How zefoy/ngx-color-picker works
ngx-color-picker is an Angular color-selection widget exposed through the colorPicker directive. A consumer supplies a color and configuration, opens a dialog, edits colors through controls or presets, and receives change, selection, and related events. The directive creates and configures the picker component; the component uses the service for color conversion and coordination, with helper directives and positioning logic supporting interaction. The README documents additional dialog modes, CMYK, alpha/output formats, and buttons. The example app demonstrates usage; unsampled templates and implementation details are represented only where documented.
Main entry points: color-picker.component.ts Picker Dialog · color-picker.service.ts Color Service · app.component.ts Example Component · color-picker.directive.ts Picker Directive
Components 8
Angular Integration
- Picker Directive
projects/lib/src/lib/color-picker.directive.ts
Picker Interface
- Picker Dialog
projects/lib/src/lib/color-picker.component.ts - Input And Slider Helpers
projects/lib/src/lib/helpers.ts
Color Processing
- Color Service
projects/lib/src/lib/color-picker.service.ts - Color Formats
projects/lib/src/lib/formats.ts
Example App
- Example Component
projects/app/src/app/app.component.ts - Example Bootstrap
projects/app/src/main.ts
Other components
- Angular Consumer
Connections 10
- Angular Consumer → Picker Directive: uses directive
README.md - Picker Directive → Picker Dialog: creates and configures
projects/lib/src/lib/color-picker.directive.ts - Picker Dialog → Color Service: uses conversions
projects/lib/src/lib/color-picker.component.ts - Picker Dialog → Input And Slider Helpers: uses controls
projects/lib/src/lib/color-picker.component.ts - Picker Dialog → Color Formats: uses color types
projects/lib/src/lib/color-picker.component.ts - Color Service → Color Formats: converts values
projects/lib/src/lib/color-picker.service.ts - Color Service → Picker Dialog: closes active dialog
projects/lib/src/lib/color-picker.service.ts - Example Bootstrap → Example Component: bootstraps
projects/app/src/main.ts - Example Component → Picker Directive: demonstrates usage
projects/app/src/app/app.component.ts - Example Component → Color Service: calls conversions
projects/app/src/app/app.component.ts