]> git.r.bdr.sh - rbdr/tomato-sauce/blob - lib/renderers/fake_color.js
b03309c365beac8ffb87b7aabcfaaa6b9d2b59c0
[rbdr/tomato-sauce] / lib / renderers / fake_color.js
1 'use strict';
2
3 /**
4 * Returns a malformed 24-bit ansi color
5 *
6 * @function FakeColorRenderer
7 * @implements IRenderer
8 */
9 module.exports = function (red, blue, green) {
10
11 return `\x1B[28;2;${Math.round(red)};${Math.round(green)};${Math.round(blue)}m`;
12 };