Skip to content

Commit f5b0ab6

Browse files
authored
Merge pull request #263 from IvanBashkirov/master
fixed a color description bug
2 parents c11ecff + 7bda248 commit f5b0ab6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jquery.minicolors.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
var size;
147147
var swatches;
148148
var swatch;
149+
var swatchString;
149150
var panel;
150151
var i;
151152

@@ -223,10 +224,11 @@
223224
name = '';
224225
swatch = settings.swatches[i];
225226
}
227+
swatchString = swatch;
226228
swatch = isRgb(swatch) ? parseRgb(swatch, true) : hex2rgb(parseHex(swatch, true));
227229
$('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" title="' + name + '"></span></li>')
228230
.appendTo(swatches)
229-
.data('swatch-color', settings.swatches[i])
231+
.data('swatch-color', swatchString)
230232
.find('.minicolors-swatch-color')
231233
.css({
232234
backgroundColor: rgb2hex(swatch),

0 commit comments

Comments
 (0)