News for hackers. Stuff that matters.
Re:Show HN: HN Avatars in 357 bytes by squiffy on Monday March 14, 2022 @08:05AM (#30671406)
This is great, thanks. A small fix I made to stop console warnings was to change:

  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.

There are no comments on this comment yet.