Changing the text color in text box

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
DovDubon
Newbie
Posts: 4
Joined: Thu Nov 23, 2017 8:06 am
Contact:

Changing the text color in text box

#1 Post by DovDubon »

Hello! im new to ren'py software, and to phyton.

i want to change the text color in the textbox, i searched the internet an i found that i need to find 'styles' properties in the options rty, but there is not such text.
also, i searched for the text 'color' on the options.rty and didt find anything.

please help, the textbox color is white, and the text for some reason is whitish grey...

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Changing the text color in text box

#2 Post by Remix »

They are, within newer versions of Ren'py, now located in gui.rpy

Lots of values to play with in there
Frameworks & Scriptlets:

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Changing the text color in text box

#3 Post by Donmai »

Look for these lines in the "colors" section of gui.rpy:

Code: Select all

## The colors used for dialogue and menu choice text.
define gui.text_color = '#402000'
define gui.interface_text_color = '#404040'
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

DovDubon
Newbie
Posts: 4
Joined: Thu Nov 23, 2017 8:06 am
Contact:

Re: Changing the text color in text box

#4 Post by DovDubon »

thank you both!
i only got it halfway, the text in textbox is #000000 now, but menus are still the same color even though:
## The colors used for dialogue and menu choice text.
define gui.text_color = '#000000'
define gui.interface_text_color = '#000000'


What am i missing?

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Changing the text color in text box

#5 Post by Remix »

Do you mean menus as in choices in dialogue? If so, find ## Choice in gui.rpy and tinker the values...


## Choice Buttons ##############################################################
##
## Choice buttons are used in the in-game menus.

define gui.choice_button_width = 790
define gui.choice_button_height = None
define gui.choice_button_tile = False
define gui.choice_button_borders = Borders(100, 5, 100, 5)
define gui.choice_button_text_font = gui.text_font
define gui.choice_button_text_size = gui.text_size
define gui.choice_button_text_xalign = 0.5
define gui.choice_button_text_idle_color = "#cccccc" # <----
define gui.choice_button_text_hover_color = "#ffffff" # <--- probably these two
Frameworks & Scriptlets:

DovDubon
Newbie
Posts: 4
Joined: Thu Nov 23, 2017 8:06 am
Contact:

Re: Changing the text color in text box

#6 Post by DovDubon »

This is it exacly!
Thank you for your patiance

User avatar
Bum_McFluff
Regular
Posts: 45
Joined: Sat Aug 18, 2018 8:15 pm
Contact:

Re: Changing the text color in text box

#7 Post by Bum_McFluff »

The original post was 4 years ago. It is currently April 2021 and my gui shows me this:

Code: Select all

## The colors used for dialogue and menu choice text.
define gui.text_color = u'#ffffff'
define gui.interface_text_color = u'#ffffff'
I don't know what the "u" means, but when I try to change the value to #000000 instead of #ffffff it still shows the dialogue text as white instead of black.

[Edit]
I discovered that in copying and moving my rpy files into fodlers to try and keep everything more managable, the game was still referencing an original file. This works as it should now. The error was mine.
What, spy on our spy as he searches for their spy? Why not, sounds rather like fun.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]