• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Changing Text Colors in Windows.xml (EmptyInfoPanel Text)

Jaspymon

New member
I am attempting to change the color of font in the Windows.xml file, specifically in the emptyInfoPanel section of text. I have figured how how to change the size and positioning of the text, but I have not been able to change the color beyond black, grey, dark grey, white, and red. I would like to add additional colors, like yellow, orange, purple, etc. If possible, I would like to add custom colors, like a dark red or pale yellow. The Windows.xml file does not seem to use the hex codes for color, but instead uses color="[black]" and color="[white]" for text. I tried color="[yellow]" and color="[orange]" without luck.

Is there a way to add custom colors (dark red, pale yellow, etc.) as text in the Windows.xml file? If not, how do you get colors like yellow, orange, and purple in the text?

And, while I'm here, is there a way to change font size in the middle of a line of text? I wanted to make one letter larger than another, but had to separate them onto different lines.

 
In windows.xml for yellow do: color="255,255,0" -- or color="255,255,0,50" if you wanted some transparency. Color takes R,G,B,A with the Alpha being an optional value.

Optionally you can add new colors to styles.xml then you could use [yellow]

Code:
<style_entry name="yellow" value="255,255,0"/>
Optionally you can include it in the text:

Code:
<label name="label_myLabel" depth="2" text="[FFFF00]Some yellow text" font_size="22" />
You cannot change font size in the middle of the text. Need different labels for each as far as I am aware (as you noted).

Hope that helps.

 
Back
Top