X-Git-Url: https://git.r.bdr.sh/rbdr/tomato-sauce/blobdiff_plain/c7b4bd19a006d61c3b4979e884370d123cec7524..226ad561a01402590ebf3fa61912fd5d8f93f632:/lib/renderers/fake_color.js?ds=sidebyside diff --git a/lib/renderers/fake_color.js b/lib/renderers/fake_color.js index b82bb45..b03309c 100644 --- a/lib/renderers/fake_color.js +++ b/lib/renderers/fake_color.js @@ -1,8 +1,12 @@ 'use strict'; -// Sends malformed ANSI 24-bit color strings -const FakeColor = function (red, blue, green) { +/** + * Returns a malformed 24-bit ansi color + * + * @function FakeColorRenderer + * @implements IRenderer + */ +module.exports = function (red, blue, green) { + return `\x1B[28;2;${Math.round(red)};${Math.round(green)};${Math.round(blue)}m`; }; - -module.exports = FakeColor;