This is an experimental script for a fan game I am going to work on, using Clickteam Fusions RGB Coefficient command instead of their "so called old, outdated, expensive" Color Replace feature. As the Clickteam staff moves on to develop Fusion 3 from scratch, a lot of the older features/commands will be absent. RGB Coefficient seems to be the only alternative we have at this point.
This is the result of my experiences of RGB Coefficient colorization for pixel art based classic games.
Created with Clickteam Fusion 2.5 Developer. version.
What is RGB Coefficient?
- The RGB coefficient script works just like a "multiply" effect. Basically, each of the components of the original color is remapped from [0-255] to [0.0-1.0], and then this is multiplied by the corresponding RGB Coefficient value.
Why are the graphics white?
- The sprites are separated into multiple object layers. These layers are then colored completely white. They act as masks to obtain the most accurate color possible through color manipulation when the game script is running.
White: (R-255,G-255,B-255) = (1.0, 1.0, 1.0). So if you multiply anything by 1.0, it will stay the same.
Black: (R-0,G-0,B-0) = (0.0, 0.0, 0.0). So multiplying anything by 0.0, it will be 0, which means no color change.
- Example: So if we have an object with color R-255,G-255,B-255, we set the RGB coefficient of said object to R-50,G-100,B-200, the object will appear with the exact values we set. In this case, it will be a shade of blue.
So why all the separated sprite layers?
- As stated above, RGB coefficient just multiplies the colors of a single object. If this object already has multiple shades of colors, those colors will be multiplied by the new values defined by the RGB coefficient script. We need to separate these shades of said object into multiple objects to correctly colorize them in game. This gives us a way to perform accurate color matches from source game, and introduce the option of color swapped layers of a character, such as Mega Man when he obtains a new boss weapon.
Mega Man's color layers:
- Outline: 255,255,255 into 0,0,0 = Black.
Since the black outline is set to white to begin with, we can change this black color to another color when we need to. Examples include when Mega Man uses a charged weapon shot, his outline glows.
- Color 1: 255,255,255 into 0,112,232 = Blue
- Color 2: 255,255,255 into 0,232,216 = Cyan
- Face: 255,255,255 into 248,216,168 = Peach
I am hoping that Clickteam's Fusion 3 software development tool will continue to use RGB Coefficient as their standard for color manipulation. Considering we will no longer have the outdated 'Replace Color' as an option for the same effect.
I would also like to thank WreckingPrograms for the inspiration of this. He is the creator of Mega Man Maker
, as well as his famous fan made Mega Engine for Game Maker Studio. He made a similar script in Game Maker that uses white colored mask objects to do the task that Mega Man is known for.