diff --git a/colors.js b/colors.js index 1eb96f6..6ce4a11 100644 --- a/colors.js +++ b/colors.js @@ -35,7 +35,7 @@ var addProperty = function (color, func) { } var isHeadless = (typeof module !== 'undefined'); -['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'].forEach(function (style) { +['bold', 'underline', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'].forEach(function (style) { // __defineGetter__ at the least works in more browsers // http://robertnyman.com/javascript/javascript-getters-setters.html @@ -79,7 +79,7 @@ function stylize(str, style) { //grayscale 'white' : ['\033[37m', '\033[39m'], 'grey' : ['\033[90m', '\033[39m'], - 'black' : ['\033[90m', '\033[39m'], + 'black' : ['\033[30m', '\033[39m'], //colors 'blue' : ['\033[34m', '\033[39m'], 'cyan' : ['\033[36m', '\033[39m'], diff --git a/example.js b/example.js index 6c8910c..6aefa81 100644 --- a/example.js +++ b/example.js @@ -9,10 +9,12 @@ sys.puts('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); sys.puts('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported //sys.puts('zalgo time!'.zalgo); sys.puts(test.stripColors); - +sys.puts("a".grey + " b".black); sys.puts(colors.rainbow('Rainbows are fun!')); sys.puts(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported sys.puts(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported //sys.puts(colors.zalgo('zalgo time!')); sys.puts(colors.stripColors(test)); +sys.puts(colors.grey("a") + colors.black(" b")); +