I have controlled the color text, but as I tell you, the character's name does not change color.
EDIT: D'OH. I'm an idiot.
In your original example, you're using
Playername
to talk.
Playername
is a string variable that doesn't have other attributes (like color). RenPy will use it, but will print it using the default colors.
(and worse... I copied your exact error when writing out my reply and still didn't notice).
What you want instead is:
Python:
PN "I have to present myself properly to make a good impression, alth..."
Using
PN
(the
Character()
) and not
Playername
(the simple string variable).
Others above me have already pointed this out. Including
guest1492 and
moskyx .
Personally, unless you have a lot of dialogue already, I would call the character
mc
or at least
pn
instead of
PN
. Typing uppercase characters like that all the way through your script will be a PITA eventually.
So here's my other
(wrong) reply... included because... well, it took a while to type...
Ah. Okay.
So you're talking about the standard name, printed above the dialogue spoken by the player's character.
Most of my original reply isn't what you were looking for.
However, you still clearly have an issue.
My first suggestion would be to create a brand new "test" project. Name it anything you like, since you'll probably be deleting it shortly anyway.
Then create the most simple RenPy game ever...
Python:
define e = Character("Eileen", color="#FF0000")
label start:
scene black with fade
e "You've created a new Ren'Py game."
e "Once you add a story, pictures, and music, you can release it to the world!"
return
(which is basically the starter template with all the comments removed and a
color=
parameter added)
Run the game... Eileen's name should be in
RED.
Change the line to:
define e = Character("Eileen", color="#00CCFF")
Run the game... Eileen's name should now be
CYAN.
Which doesn't help much, except to prove to you that under normal circumstances,
color=
works just fine.
If it doesn't... erm... Either RenPy is broken or you have the world's most unique monitor failure.
So delete the test project, and let's start thinking about your main game.
The main processing of the screen dialogue is handled by a predefined screen called
screen say(who, what):
within the
screens.rpy
file. I'm guessing you've either messed with that, or the supporting configuration variables within
gui.rpy
.
So within the
say()
screen, there's a bit of code that prints the character's name (if there is one for this bit of dialogue). It's known as
namebox
.
The
namebox
definition is linked to a
style
called
namebox_label
, which in turn is linked to another style
say_label
.
By default,
say_label
looks like this:
Python:
style say_label:
properties gui.text_properties("name", accent=True)
xalign gui.name_xalign
yalign 0.5
If it doesn't look like that, it's because you messed with it at some point... and...
If you didn't mess with that bit. Did you perhaps make any alternations to the
gui.rpy
file?
The
properties gui.text_properties("name" ...
bit of the code essentially says to fill in the gaps of the style definition using variables called
gui.name_{something}
where
{something} is whatever parameters it needs for the style.
If (for example), you've added a new line like:
define gui.name_text_color = "#00FF00"
, it could override things and make the name
GREEN.
(though in fairness, the color specified on the
Character()
definition overrides even that).
It's difficult to say for sure. But my guess is that you've tweaked the
screen say()
at some point.