mirror of
https://github.com/flynx/colors.js.git
synced 2025-10-29 19:10:10 +00:00
[fix] fixed the black color to fix issue #6
This commit is contained in:
parent
5af04df3f3
commit
e32b28196e
@ -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'],
|
||||
|
||||
@ -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"));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user