summaryrefslogtreecommitdiff
path: root/lib/renderers/256_colors.js
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-08-25 12:36:37 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-08-25 12:36:37 +0200
commite5de70f2c1dcac767bd34a6b90ac1797a7acb433 (patch)
tree25a8c8f339fb5b496b460391ee06a9effeb64855 /lib/renderers/256_colors.js
parent6b909d95ec07848136a6f337db28318c1cd46c60 (diff)
parentd7bc21d19e168f3a99f54e5ba4866ed49f1187f1 (diff)
Merge branch 'rust'
Diffstat (limited to 'lib/renderers/256_colors.js')
-rw-r--r--lib/renderers/256_colors.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/renderers/256_colors.js b/lib/renderers/256_colors.js
deleted file mode 100644
index f6e57d3..0000000
--- a/lib/renderers/256_colors.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-/**
- * Returns a 256 color, see https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
- * for more info.
- *
- * @function 256ColorsRenderer
- * @implements IRenderer
- */
-module.exports = function (red, blue, green) {
-
- const redValue = Math.round(red * 5 / 255);
- const blueValue = Math.round(blue * 5 / 255);
- const greenValue = Math.round(green * 5 / 255);
-
- const colorNumber = 16 + 36 * redValue + 6 * greenValue + blueValue;
-
- return `\x1B[48;5;${colorNumber}m`;
-};