X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=rogue_chat.html;h=0a70962a0d72e30218980101b90ecea16736789d;hb=c0aba691859793c07e9d17c7494af36013f046c0;hp=17747ff55462b67c66337727ad51d67d02f55b2e;hpb=7faae7c97770388f0067c541d27e21573008115d;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index 17747ff..0a70962 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -286,7 +286,7 @@ let terminal = { }, set_random_colors: function() { function rand(offset) { - return Math.floor(offset + Math.random() * 96).toString(16); + return Math.floor(offset + Math.random() * 96).toString(16).padStart(2, '0'); } this.foreground = '#' + rand(159) + rand(159) + rand(159); this.background = '#' + rand(0) + rand(0) + rand(0);