block by veltman 20a3f4e81d9d54ab5547

Nintendo pixelation

Full Screen

Convert image to a somewhat NES-style image:

  1. Get the colors of each square of n pixels.
  2. Convert those colors from RGB to LAB and average them.
  3. Round that color to the closest color in the NES palette.
  4. Convert back to RGB and set all n pixels to that color.

index.html

nes-palette.js