Previously I wrote Twin primes visualized over an Ulam Spiral in HTML5, I reused the code and added the coloring as:
- All primes ending in 1 are green.
- All primes ending in 3 are red.
- All primes ending in 7 are blue.
- The prime 2 is yellow.
- The prime 5 is gray.
Here is the result with each square with size 4 pixels:
Here is the same with each square of size 2 pixels:
And with 1 pixels: