Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Color Cube
1 point by atum47 on Nov 6, 2020 | hide | past | favorite | 2 comments
copy and paste this on your browser's console (chrome & firefox)

    d=document,v=d.body.appendChild(d.createElement('canvas'))
    v.height=s=256,c=v.getContext('2d')
    for(r=0;r<s;r+=4)for(g=0;g<s;g+=4)for(b=0;b<s;b+=4)
    c.fillStyle=`rgb(${r},${g},${b})`,c.fillRect((2*r+g)/4,(2*b+g)/4,2,2)
or click here: https://jsfiddle.net/victorqribeiro/scnLkep6/



awesome




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: