fix bug in converter and add two new themes
This commit is contained in:
parent
29e1838394
commit
4d88770435
25 changed files with 346 additions and 51 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue