X-Git-Url: https://git.r.bdr.sh/rbdr/tomato-sauce/blobdiff_plain/c80b2f4575cfc3d74ec8e0b112943cbd081ffcd7..a0666be3ab58ed83ad6d622cfe2b8293c40dffbb:/lib/renderers/256_colors.js diff --git a/lib/renderers/256_colors.js b/lib/renderers/256_colors.js index f6e57d3..8fc67b2 100644 --- a/lib/renderers/256_colors.js +++ b/lib/renderers/256_colors.js @@ -9,11 +9,11 @@ */ 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 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; + const colorNumber = 16 + 36 * redValue + 6 * greenValue + blueValue; - return `\x1B[48;5;${colorNumber}m`; + return `\x1B[48;5;${colorNumber}m`; };