Skip to content

Commit

Permalink
correct ansi colors for 16 colors environments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorik Tangelder committed Mar 22, 2016
1 parent ad8ab1d commit 4d2daef
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/report/common/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ module.exports = {
colorize: function (str, clazz) {
/* istanbul ignore if: untestable in batch mode */
if (supportsColor) {
switch (clazz) {
case 'low' : str = '\x1B[91m' + str + '\x1B[0m'; break;
case 'medium': str = '\x1B[93m' + str + '\x1B[0m'; break;
case 'high': str = '\x1B[92m' + str + '\x1B[0m'; break;
}
var colors = {
low: '31;1',
medium: '33;1',
high: '32;1'
};
return '\u001b[' + colors[clazz] + 'm' + str + '\u001b[0m';
}
return str;
},
Expand Down

0 comments on commit 4d2daef

Please # to comment.