fix bug in converter and add two new themes

This commit is contained in:
nightwing 2013-10-30 17:33:54 +04:00
commit 4d88770435
25 changed files with 346 additions and 51 deletions

View file

@ -157,9 +157,13 @@ function luma(color) {
}
function parseColor(color) {
if (color.length == 4)
color = color.replace(/[a-fA-F\d]/g, "$&$&");
if (color.length == 7)
return color;
else {
if (!color.match(/^#(..)(..)(..)(..)$/))
console.error("can't parse color", color);
var rgba = color.match(/^#(..)(..)(..)(..)$/).slice(1).map(function(c) {
return parseInt(c, 16);
});
@ -247,6 +251,7 @@ var themes = {
"solarized_dark": "Solarized-dark",
"solarized_light": "Solarized-light",
"katzenmilch": "Katzenmilch",
"kuroir": "Kuroir Theme",
//"textmate": "Textmate (Mac Classic)",
"tomorrow": "Tomorrow",
"tomorrow_night": "Tomorrow-Night",