by squiffy · 4y ago · 0 comments
x.fillStyle = '#' + ((r >> 8) & 0xffffff).toString(16).padStart(0, 6);
to: x.fillStyle = '#' + ((r >> 8) & 0xffffff).toString(16).padStart(6, '0');
as the pad target length is the first parameter of padStart.No comments yet.