Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How do I change font COLOR?

I guess i'm a bit of a n00b, but I can't find anywhere in the scripts that deifnes the COLOR of the FONT.
If anyone knows which script this is in and/or how to input color, please say.
 
It's a sad day when I have a scripting answer, of all people.

Go into Game_Temp, it's the very first thing in the script menu. At Line 1, hit enter, then type the following line:
       
              Font.default_color = Color.new(255,255,255,255)

This has to be the first thing in the list, even before the line of green dashes. Also, since the scripts are in American English, it has to be spelled 'color', instead of the more European 'colour', so no U.

Now, that makes the font black. To get other colours- and I'm assuming that it goes RGB- just lower the first three sets of numbers; the first set is red, the second green, and the third blue.  I think the fourth set is tone or intensity. Of coarse, like I said, that's assuming the order is RGB: so for red font, you would adjust it so that the numbers read, " 255,0,0,255", for yellow font its '0, 255, 255, 255', and so on.

You'll have to tinker with the numbers to get the colour you want.
 
This did not seem to work.
I have

Font.default_color = Color.new(255,255,255)
#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
#  Refer to "$game_temp" for the instance of this class.
#==============================================================================

I have input this wrong, let me know.
And is the RGB for black not 0,0,0?
I thought 255,255,255 was for white.
 
Ah, no problem. This is a bit odd, though that the font is black only in the shop window, and I have not edited that script at all.
Though I have read in it that it refers to the "default color" so in fact the script was correct, but the "default color" does not apply immediately to the program. So yeah, you were right. ^_^
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top