Log In  

Cart #35664 | 2017-01-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
53

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.

P#35611 2017-01-13 14:17 ( Edited 2017-06-12 01:17)

Really useful, thanks!

P#35613 2017-01-13 15:39 ( Edited 2017-01-13 20:39)

Wow this is great! thanks! I want to do something with day/night palettes and this gives me an idea...

P#35615 2017-01-13 15:51 ( Edited 2017-01-13 20:51)

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.

P#35640 2017-01-14 01:29 ( Edited 2017-01-14 06:29)

Thanks for posting this, it will definitely come in handy - bookmarked!

P#35644 2017-01-14 02:10 ( Edited 2017-01-14 07:10)

@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.)

P#35648 2017-01-14 02:55 ( Edited 2017-01-14 08:34)

@musurcra: Why not? Thanks.

P#35650 2017-01-14 03:37 ( Edited 2017-01-14 08:37)

Wow, great. Would never think of that!

P#35669 2017-01-14 11:48 ( Edited 2017-01-14 16:48)

Thought about creating some fadetables for me, so thanks for saving me the time! ;)

P#37012 2017-02-01 15:32 ( Edited 2017-02-01 20:32)

Best demoscene I've seen so far. 9/10.

P#37422 2017-02-13 13:59 ( Edited 2017-02-13 18:59)

Thanks! Need to continue work on this...

P#37477 2017-02-15 02:56 ( Edited 2017-02-15 07:56)

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!

P#40218 2017-05-05 14:02 ( Edited 2017-05-05 18:02)

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?)

P#41549 2017-06-11 21:17 ( Edited 2017-06-12 01:17)

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.

P#68247 2019-09-29 03:22

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.

P#68253 2019-09-29 16:33 ( Edited 2019-09-29 16:59)

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)

P#77846 2020-06-09 11:01 ( Edited 2020-06-09 12:00)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 21:34:36 | 0.048s | Q:43