xaguilars/bootstrap-colorpicker — pull request #6 by tiagoblackcode (2012-12-01 16:34:44+00:00)
Title: Fixed some style issues and added the palette option to the colorpicker constructor

Howdy!

I've checked the sample page you put into the develop branch and I saw there was a bug in the preview due to the existence of the palette. This was because the preview was being searched through the `div:last` selector. I've fixed this along with some design issues that were occurring, such as the width of the table when the `color-format` was `rgba` not spanning to the end of the `div` and also there was too much spacing between the elements in the palette when the palette has less than a full row.

I've also added the functionality to provide the palette as an option to the colorpicker constructor like this:

```
$('#cp6').colorpicker({
palette: [
"rgb(253,0,0)", "rgb(191,48,48)", "rgb(166,0,0)", "rgb(255,64,64)",
"rgb(255,115,115)", "rgb(255,116,0)", "rgb(191,113,48)", "rgb(166,75,0)",
"rgb(255,150,64)", "rgb(255,178,115)", "rgb(205,0,116)", "rgb(153,38,103)"
]
});
```

Despite this, I've kept the `color-palette` data attribute so that you can provide a different palette for a given set of colorpicker inputs in an unobtrusive manner. In web frameworks like Rails you can easily convert a Ruby object to a JSON object without have to worry much about the double quotes and such.

I've also updated the `index.html` to reflect these changes. I also filled a decent palette into the example input! :smiley_cat:

Best Regards,
Tiago Melo