From: Matthew Walker Date: Thu, 6 Nov 2014 16:27:10 +0000 (-0700) Subject: Colour codes need to be 2-wide zero padded X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=770a126529fc6bd1dac4ff8372593b8f1fa01564;p=KiwiIRC.git Colour codes need to be 2-wide zero padded --- diff --git a/client/assets/plugins/textstyle.html b/client/assets/plugins/textstyle.html index 4fc54ca..fc7d495 100644 --- a/client/assets/plugins/textstyle.html +++ b/client/assets/plugins/textstyle.html @@ -121,7 +121,13 @@ var style_codes = ''; if (styles.colour !== false) { - style_codes += String.fromCharCode(3) + styles.colour.toString(); + var colour_code = styles.colour.toString(); + + if (styles.colour < 10) { + colour_code = '0' + colour_code; + } + + style_codes += String.fromCharCode(3) + color_code; } if (styles.bold) {