I made this simple tool for generating tables for fading colors with pal(). It generates the table and a simple function for setting up.
In the future, I will experiment with stuff like non-linear interpolation and separate speeds for R, G and B.
In LAB space a standard Euclidean distance metric works pretty well to match/differentiate hues. (Might be overkill for this but just curious if it leads to different results.)
Some simple token-saving optimizations :
The last column in the table is always redundant. You can save tokens by deleting the last value from each row of the table, and editing the line "if i+1>=N" (change N to N-1)
If you're fading to black, you can delete the first row of the table. Loop over c=1,15, and change "[c+1]" to "[c]"
(If you were fading to color 15, you could easily delete the last row, but who fades to color 15?)
Shouldn't this be pinned in resources? Seems extremely useful. I'd even see if there would be a way to move the offsite tool to lexoffle.com itself, or maybe port the interpolation scheme into a cart so you can write it and the code to the clipboard.
Also, any plans to update this to include the new 16 colors found? I bet they'd make really nice super smooth transitions.
With the 0.2.0i update, pal now has the ability to set all colors at once with a table. maybe this could be updated with a new format which uses this new feature?
instead of a table which illustrates the colors a color will transform into at every step, each table would represent an entire step, with an entry for every color
this gets rid of the c loop and saves tokens as well
(there was no reason for me to go that in-depth about it considering you probably know more about this than I do)
[Please log in to post a comment]