fade_interpolate(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

fade_interpolate β€” the function that whips up a brand-new palette by interpolating between two other palettes 🎨✨ Part of the Allegro game programming library, bestie πŸ’…


✨ SYNOPSIS ✨

#include <allegro.h>

void fade_interpolate(const PALETTE source, const PALETTE dest, PALETTE
output, int pos, int from, int to);

Obsessed with how clean that signature is, ngl. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, bestie β˜• β€” fade_interpolate literally calculates a temporary palette that sits part way between source and dest, and it hands that fresh new palette back to you in the output parameter. it's giving glow-up, but make it math πŸ’–

where exactly it lands between those two extremes? that's what pos is for, and it's so simple:

  • 0 gives you an exact copy of source β€” like, a full clone, no changes, no cap πŸ‘‘
  • 64 gives you dest β€” we made it all the way, slay πŸ’…
  • 32 gives you a palette that's half way between the two β€” the middle child, the main character moment 🌸
  • and etc., you get the vibe, it's just a position along the way ✨
⚠️ but wait β€” this routine only touches the colors between from and to, and yes that's inclusive, both ends, no crumbs left behind πŸ“ so if you wanna interpolate the entire palette you gotta pass 0 and 255. that's the whole palette, every single color, periodt πŸ’€βœ¨

🌈 SEE ALSO 🌈


and that's the whole page, bestie!! this icon of a manpage came from Allegro, version 4.4.3 β€” written in the fade_interpolate(3) era, the one and only πŸ¦‹βœ¨ go interpolate something pretty, ily, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from