Angular DropDown Color Picker
npm install toggle-color-picker
npm install --save toggle-color-picker
`
You will then need to include the module to your app.module.ts:
`typescript
import { ColorPickerModule } from 'ng2-color-picker';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
// ...
@NgModule({
imports: [
NgbModule.forRoot(); // In Feature Module, you don't need 'forRoot()'
ColorPickerModule
]
})
///...
`
HTML Component Markup
`html
(selected)='selected($event)'
[option]="optionColors">
`
Configuration
Current list of configuration options, types and default values:
option is object containers defaultColor and configColorList.
| Property | Type | Default | Description. |
| -------- | ---- | ------- | ------------ |
| defaultColor| string | #808080 | default color is gay. |
| configColorList | list | ['#808080','#000000',#ffffff]` | need configuration. display color list to choose |