GML [El Solvedo] Any way to change the colour of the sprite font?

Edwin

Member
Hello.

I have a sprite font.
Code:
global.spritefont_black = font_add_sprite( ... );
I need to change the colour of that, but it's a sprite so there is no way to change it instead of creating new sprite for your coloured font.

What should I do? Transform my sprite font into default font? If so, what programs will help with that?
 

NightFrost

Member
Yes. This is because the colorization used by the commands runs in the same manner as you can see in a default fragment shader. It multiplies a pixel's color with the provided color. Since all RGB values will be handled in 0 to 1 range, it will multiply the font sprite's white (1.0, 1.0, 1.0) by whatever color you provided, and the result is exactly the color you wanted.
 
Top