buberdds / angular-bootstrap-colorpicker

Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.
MIT License
419 stars 226 forks source link

Predefined colors #75

Closed piernik closed 9 years ago

piernik commented 9 years ago

Cen You add predefined colors top pick with one click like in here http://bgrins.github.io/spectrum/ "Show Palette" section.

michaeljota commented 9 years ago

Have you tried to parse it as an option?


<li><spectrum-colorpicker ng-model="yourModel" options="{
    showPaletteOnly: true,
    showPalette:true,
    color: 'blanchedalmond',
    palette: [
        ['black', 'white', 'blanchedalmond',
        'rgb(255, 128, 0);', 'hsv 100 70 50'],
        ['red', 'yellow', 'green', 'blue', 'violet']
    ]
}" format="'rgb'"></spectrum-colorpicker></li>

This should work. As least is made to work like that.

Sorry for my bad english. n__n

buberdds commented 9 years ago

Hey, I will try to merge #68 today. Then you'll be able to create such pallete on your own

jgribonvald commented 8 years ago

Is there a way to purpose additionnaly pre-defined colors in some options for basic text color black or white ?