From fd38d4096e65ba5afba8ed1ddc75ed1814ca8c16 Mon Sep 17 00:00:00 2001 From: Rubén Beltran del Río Date: Tue, 26 Jun 2018 22:00:10 +0000 Subject: Update Documentation --- lib/renderers/fake_color.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/renderers/fake_color.js') 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; -- cgit