4 ms·
His "non-dumb" code converts colors from a vector-space to a laundry list. The tuple representation of colors has algebraic qualities absent from the simplisti
by mahmud 15y ago
His "non-dumb" code converts colors from a vector-space to a laundry list.
The tuple representation of colors has algebraic qualities absent from the simplistic lookup-table he proposes (in fact, he's inadvertently taking us back from full color to "indexed" palettes common in the 80s)
I prefer the tuples better; at least they can be logically extended to include alpha & depth information, and can be efficiently packed into a machine word.)
- ZeroGravitas 15y agoI think the colors are still tuples and there's still a lookup either way, it's just that instead of having an expressive human-readable name like "Tomato" they have an opaque code number like "0".
- secoif 15y agoIf you read the last part of the article you will find he is, in fact, proposing the tuple method and is aghast at the debugging issues/readability of the lookup table, vs arguable speed increase.
- mahmud 15y agoThe exposition could be better, imo. Nevertheless, nice to know we agree.