I made this simple tool for generating tables for fading colors with pal(). It generates the table and a simple function for setting up.
http://kometbomb.net/pico8/fadegen.html
In the future, I will experiment with stuff like non-linear interpolation and separate speeds for R, G and B.
Wow this is great! thanks! I want to do something with day/night palettes and this gives me an idea...
Nice that you find this useful! Have fun!
BTW, I'm experimenting with HSV instead of RGB to find the best color match (how else to spend a nice Saturday morning?) and it seems to work better. Watch this space.
Thanks for posting this, it will definitely come in handy - bookmarked!
@kometbomb— if you feel like experimenting, maybe try LAB color too: https://www.shadertoy.com/view/4s3SD4
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.)
Thought about creating some fadetables for me, so thanks for saving me the time! ;)
Awesome. I was going to manually create fade-out palette set, but I kept putting it off because it seemed tedious as heck.
Thanks for a useful tool!
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.
Hmmm...
Also, any plans to update this to include the new 16 colors found? I bet they'd make really nice super smooth transitions.
Indeed this is a superior fade. Gets my star.
Hmm ... got my brain spinning. Lemme finish up the sprite-flag thingy I'm working on and I'll code up an idea I got by watching this.
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]