Skip to content

Commit

Permalink
bump TinyColor to 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrins committed Dec 8, 2014
1 parent 2d2c949 commit cb07152
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion spectrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@
}
};

// TinyColor v1.0.0
// TinyColor v1.1.1
// https://github.com/bgrins/TinyColor
// Brian Grinstead, MIT License

Expand Down Expand Up @@ -1202,6 +1202,7 @@
}

var rgb = inputToRGB(color);
this._originalInput = color,
this._r = rgb.r,
this._g = rgb.g,
this._b = rgb.b,
Expand Down Expand Up @@ -1232,6 +1233,9 @@
isValid: function() {
return this._ok;
},
getOriginalInput: function() {
return this._originalInput;
},
getFormat: function() {
return this._format;
},
Expand Down Expand Up @@ -2048,6 +2052,7 @@
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "663399",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
Expand Down Expand Up @@ -2195,6 +2200,7 @@
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
Expand Down Expand Up @@ -2236,6 +2242,9 @@
if ((match = matchers.hsv.exec(color))) {
return { h: match[1], s: match[2], v: match[3] };
}
if ((match = matchers.hsva.exec(color))) {
return { h: match[1], s: match[2], v: match[3], a: match[4] };
}
if ((match = matchers.hex8.exec(color))) {
return {
a: convertHexToDecimal(match[1]),
Expand Down

0 comments on commit cb07152

Please sign in to comment.