summaryrefslogtreecommitdiff
path: root/lib/renderers/fake_color.js
diff options
context:
space:
mode:
authorRubén Beltran del Río <ben@nsovocal.com>2018-06-26 22:00:10 +0000
committerRubén Beltran del Río <ben@nsovocal.com>2018-06-26 22:00:10 +0000
commitc80b2f4575cfc3d74ec8e0b112943cbd081ffcd7 (patch)
tree4d2c7a991fcc6510431af72225f7cea2c450f86a /lib/renderers/fake_color.js
parentbe12c97f83026087e0974fc54508b09c3154c9eb (diff)
parentfd38d4096e65ba5afba8ed1ddc75ed1814ca8c16 (diff)
Merge branch 'feature/rbdr-update-docs' into 'master'
Update Documentation See merge request rbdr/tomato-sauce!1
Diffstat (limited to 'lib/renderers/fake_color.js')
-rw-r--r--lib/renderers/fake_color.js12
1 files changed, 8 insertions, 4 deletions
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;