switch to warmer colors

This commit is contained in:
Philipp Kunz 2017-01-21 19:46:51 +01:00
parent 044ccf47e6
commit fa09d9d8a2
4 changed files with 11 additions and 9 deletions

6
dist/index.js vendored
View File

@ -13,13 +13,13 @@ let colorTranslator = (colorArg) => {
case 'brown': case 'brown':
return { r: 1, g: 0, b: 0 }; return { r: 1, g: 0, b: 0 };
case 'cyan': case 'cyan':
return { r: 0, g: 4, b: 4 }; return { r: 2, g: 4, b: 4 };
case 'green': case 'green':
return { r: 2, g: 5, b: 0 }; return { r: 3, g: 4, b: 0 };
case 'orange': case 'orange':
return { r: 5, g: 3, b: 0 }; return { r: 5, g: 3, b: 0 };
case 'pink': case 'pink':
return { r: 5, g: 0, b: 5 }; return { r: 5, g: 0, b: 3 };
case 'red': case 'red':
return { r: 5, g: 0, b: 0 }; return { r: 5, g: 0, b: 0 };
case 'white': case 'white':

View File

@ -9,10 +9,10 @@ describe('beautycolor', function () {
console.log(beautycolor.coloredString('this is a red font with green background', 'red', 'green')); console.log(beautycolor.coloredString('this is a red font with green background', 'red', 'green'));
}); });
it('should produce different font colors', function () { it('should produce different font colors', function () {
console.log(beautycolor.coloredString('blue', 'blue'), beautycolor.coloredString('brown', 'brown'), beautycolor.coloredString('red', 'red'), beautycolor.coloredString('orange', 'orange'), beautycolor.coloredString('green', 'green'), beautycolor.coloredString('cyan', 'cyan')); console.log(beautycolor.coloredString('blue', 'blue'), beautycolor.coloredString('brown', 'brown'), beautycolor.coloredString('red', 'red'), beautycolor.coloredString('orange', 'orange'), beautycolor.coloredString('green', 'green'), beautycolor.coloredString('pink', 'pink'), beautycolor.coloredString('cyan', 'cyan'));
}); });
it('should produce different baclground colors', function () { it('should produce different baclground colors', function () {
console.log(beautycolor.coloredString('blue', 'white', 'blue'), beautycolor.coloredString('brown', 'white', 'brown'), beautycolor.coloredString('red', 'white', 'red'), beautycolor.coloredString('orange', 'white', 'orange'), beautycolor.coloredString('green', 'white', 'green'), beautycolor.coloredString('cyan', 'white', 'cyan')); console.log(beautycolor.coloredString('blue', 'white', 'blue'), beautycolor.coloredString('brown', 'white', 'brown'), beautycolor.coloredString('red', 'white', 'red'), beautycolor.coloredString('orange', 'white', 'orange'), beautycolor.coloredString('green', 'white', 'green'), beautycolor.coloredString('pink', 'white', 'pink'), beautycolor.coloredString('cyan', 'white', 'cyan'));
}); });
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUVyQiw2Q0FBNEM7QUFFNUMsUUFBUSxDQUFDLGFBQWEsRUFBRTtJQUNwQixFQUFFLENBQUMsNEJBQTRCLEVBQUU7UUFDN0IsT0FBTyxDQUFDLEdBQUcsQ0FBQyxXQUFXLENBQUMsYUFBYSxDQUFDLG9DQUFvQyxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUE7SUFDeEYsQ0FBQyxDQUFDLENBQUE7SUFDRixFQUFFLENBQUMsbURBQW1ELEVBQUU7UUFDcEQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxXQUFXLENBQUMsYUFBYSxDQUFDLDBDQUEwQyxFQUFFLEtBQUssRUFBQyxPQUFPLENBQUMsQ0FBQyxDQUFBO0lBQ3JHLENBQUMsQ0FBQyxDQUFBO0lBQ0YsRUFBRSxDQUFDLHNDQUFzQyxFQUFFO1FBQ3ZDLE9BQU8sQ0FBQyxHQUFHLENBQ1AsV0FBVyxDQUFDLGFBQWEsQ0FBQyxNQUFNLEVBQUMsTUFBTSxDQUFDLEVBQ3hDLFdBQVcsQ0FBQyxhQUFhLENBQUMsT0FBTyxFQUFDLE9BQU8sQ0FBQyxFQUMxQyxXQUFXLENBQUMsYUFBYSxDQUFDLEtBQUssRUFBQyxLQUFLLENBQUMsRUFDdEMsV0FBVyxDQUFDLGFBQWEsQ0FBQyxRQUFRL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TyxFQUFFLE9BQU8sQ0FBQyxFQUNwRCxXQUFXLENBQUMsYUFBYSxDQUFDLEtBQUssRUFBRSxPQUFPLEVBQUUsS0FBSyxDQUFDLEVBQ2hELFdBQVcsQ0FBQyxhQUFhLENBQUMsUUFBUSxFQUFFLE9BQU8sRUFBRSxRQUFRLENBQUMsRUFDdEQsV0FBVyxDQUFDLGFBQWEsQ0FBQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE9BQU8sQ0FBQyxFQUNwRCxXQUFXLENBQUMsYUFBYSxDQUFDLE1BQU0sRUFBRSxPQUFPLEVBQUUsTUFBTSxDQUFDLEVBQ2xELFdBQVcsQ0FBQyxhQUFhLENBQUMsTUFBTSxFQUFFLE9BQU8sRUFBRSxNQUFNLENBQUMsQ0FDckQsQ0FBQTtJQUNMLENBQUMsQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFDLENBQUEifQ==

View File

@ -16,6 +16,7 @@ describe('beautycolor', function(){
beautycolor.coloredString('red','red'), beautycolor.coloredString('red','red'),
beautycolor.coloredString('orange','orange'), beautycolor.coloredString('orange','orange'),
beautycolor.coloredString('green', 'green'), beautycolor.coloredString('green', 'green'),
beautycolor.coloredString('pink', 'pink'),
beautycolor.coloredString('cyan', 'cyan') beautycolor.coloredString('cyan', 'cyan')
) )
}) })
@ -26,6 +27,7 @@ describe('beautycolor', function(){
beautycolor.coloredString('red', 'white', 'red'), beautycolor.coloredString('red', 'white', 'red'),
beautycolor.coloredString('orange', 'white', 'orange'), beautycolor.coloredString('orange', 'white', 'orange'),
beautycolor.coloredString('green', 'white', 'green'), beautycolor.coloredString('green', 'white', 'green'),
beautycolor.coloredString('pink', 'white', 'pink'),
beautycolor.coloredString('cyan', 'white', 'cyan') beautycolor.coloredString('cyan', 'white', 'cyan')
) )
}) })

View File

@ -33,13 +33,13 @@ let colorTranslator = (colorArg: TColorName): IRGB => {
case 'brown': case 'brown':
return {r: 1, g: 0 , b: 0} return {r: 1, g: 0 , b: 0}
case 'cyan': case 'cyan':
return {r: 0,g: 4, b: 4} return {r: 2,g: 4, b: 4}
case 'green': case 'green':
return {r: 2, g: 5, b: 0} return {r: 3, g: 4, b: 0}
case 'orange': case 'orange':
return {r: 5, g: 3, b: 0} return {r: 5, g: 3, b: 0}
case 'pink': case 'pink':
return {r: 5, g: 0, b: 5} return {r: 5, g: 0, b: 3}
case 'red': case 'red':
return {r: 5, g: 0, b: 0} return {r: 5, g: 0, b: 0}
case 'white': case 'white':