Mapping to the PICO-8 palette, perceptually

30fps.net

63 points by ibobev 6 days ago


aquova - 2 days ago

An interesting article, but it seems like quite an oversight to not even mention dithering techniques, which in my opinion give much better results.

I've done some development work in Pico-8, and some time ago I wrote a plugin for the Aseprite pixel art editor to convert an arbitrary image into the Pico-8 palette using Floyd-Steinberg dithering[0]

I ran their example image through it, and personally I think the results it gives were the best of the bunch https://imgur.com/a/O6YN8S2

[0] https://github.com/aquova/aseprite-scripts/blob/master/pico-...

a_shovel - 2 days ago

Something I've noticed from automatic palette mappings is that they tend to produce large blocks of gray that a human artist would never consider. You can see it in the water for most mappings in this sample, and even some grayish-brown grass for sRGB. It makes sense mathematically, since gray is the "average" color, and pixel art palettes are typically much more saturated than the average colors in a 24-bit RGB image. It looks ugly regardless.

CAM16-UCS looks the best because it avoids this. It gives us peach-and-pink water that matches the "feel" of the original image better. I wonder if it's designed to saturate the image to match the palette?

Marazan - 2 days ago

The main issue with any pixel-to-pixel colour mapping approach is that we don't perceive individual pixels so you will not get a good overall effect from pixel-to-pixel mapping (the article touches on this by talking about structure but you don;t have to go that far to see massively improved results).

Any serious attempt would involve higher level dithering to better reproduce the colours of the original image and dithering is one of those topics that goes unexpectedly crazy deep if you are not familiar with the literature.

WithinReason - 2 days ago

I was looking forward to seeing a dithered [0] version but it was missing. In addition, shouldn't OKLAB already be perceptually uniform and not require luma weighting?

[0]: https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dither...

ChristopherDrum - 2 days ago

The PICO-8 actually has 32 colors from which we can choose any 16. I understand that making use of the default palette is the article's intent; I'm just thinking aloud.

If one were wanting to render an image on the PICO-8 itself, the ideal algorithm would select the best 16 colors from the full 32-color palette which, when dithered, produce the most perceptually accurate version of the original image in 128x128 pixels. Were I a smarter man I would create this, but alas.

Fraterkes - 2 days ago

Kinda off-topic but for a while I’ve had an idea for a photography app where you’d take a picture, and then you could select a color in the picture and adjust it till it matched the color you see in reality. You could do that for a few colors and then eventually just map all the colors in the picture to be much closer to the perceived colors without having to do coarser post-processing.

Even if you got something very posterized like in the article I think it could at least be a great reference for a more traditional processing step afterwards. Always wonder why that doesn’t seem to exist yet.

badc0ffee - 2 days ago

I don't know anything about the PICO-8, but that is an interesting palette. It reminds me of a more saturated version of the C64.

Other systems of the time either used a simple RGBI formula with modifications (IBM, with its "CGA brown"), or a palette evenly spaced around the NTSC hue wheel (Apple II, or again the CGA in composite output mode)

bmn__ - a day ago

Result of granddaddy https://web.archive.org/web/2000/http://fordy.planetunreal.g...

https://files.catbox.moe/2uuqka.png

It's bad. :-o