Links: Unity Sprites: Hues & Color Swapping

Old games, am I right? Back in those days, they didn’t have any of these fancy 256 color pallets! In those days, you had only a handful to chose from, so devs had to swap out color pallets like a Bob Ross Marathon! Nowadays, if you want something to be a particular color, you just…. do it. There’s actually a lot of good videos that talk about how colors and images were achieved back in the days of limited color ranges.

Now, most of us know that, back in the days of limited colors and memory, games would fake sprite variety by swapping pallets. It worked pretty well, and resulted in some pretty awesome effects. But, unfortunately, the old ways must die, and now, with retro visuals all-the-rage these days, getting back those effects can be challenging.

Never fear, because our good friend Google is here!

HSV & HSL Shader by greggman

Just like in your favorite image editing application, this shader allows you to modify the Hue, Saturation, Value/Luminosity, and Alpha of your sprite. But that’s not all! You can also set the Affect range, so it will only modify certain colors within your image! It’s pretty nifty, and a good base-line cover-all for whatever your needs are.

Daniel Branicki: How to Use a Shader to Dynamically Swap a Sprite’s Colors

Here, we get a little more advanced. What this tutorial shows us, is how to use a shader to change the individual colors of a sprite. With this, we can get pretty powerful, because we can have control of just about every aspect of our sprite. He even goes over a little “Damage” effect, just to show what you can do with this ability.

So here are a few tools to add to your toolbox. Keep these around, and you’ll have that old school game dev feeling back in no time.

Minus the awful assembly code. Yikes.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.