Modding:Colors & Object Rendering: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
imported>CaptainTechnicality54384
mNo edit summary
imported>CaptainTechnicality54384
Line 103: Line 103:
If you want to color the display name, you enter color codes directly in the display name itself, for example the beaded bracelet:
If you want to color the display name, you enter color codes directly in the display name itself, for example the beaded bracelet:


<part Name="Render" DisplayName="&amp;amp;Cb&amp;amp;Be&amp;amp;ba&amp;amp;cd&amp;amp;Ce&amp;amp;Bd&amp;amp;y bracelet" ColorString="&amp;amp;C"></part>
<syntaxhighlight lang="xml">
<part Name="Render" DisplayName="&amp;amp;Cb&amp;amp;Be&amp;amp;ba&amp;amp;cd&amp;amp;Ce&amp;amp;Bd&amp;amp;y bracelet" ColorString="&amp;amp;C"></part>
</syntaxhighlight>

Revision as of 16:08, 23 May 2019

Overview

Colors are defined in display.text.

Each color is defined by a single letter. &<code> means to set the foreground color, ^<code> means to set the background color.

Only the preset letter codes are allowed, adding new colors isn't totally trivial at the moment.

Code Color
r dark red
R bright red
w brown
W yellow
c dark cyan
C bright cyan
b dark blue
B bright blue
g dark green
G bright green
m dark magenta
M bright magenta
y bright grey
Y white
k black
K dark grey
Prefix Text Xml
Foreground &<code> &<code>
Background ^<code> ^<code>

Render Part

ColorString contains the foreground and background string for the ascii and tiles.

DetailColor changes the "third" color used only for tiles, not the ascii.

So ColorString="&M^g" would be foreground bright magenta with a background color of gree.

TileColor overrides ColorString when tiles are being used.

Detail color takes just a single character.

If you want to color the display name, you enter color codes directly in the display name itself, for example the beaded bracelet:

<part Name="Render" DisplayName="&amp;amp;Cb&amp;amp;Be&amp;amp;ba&amp;amp;cd&amp;amp;Ce&amp;amp;Bd&amp;amp;y bracelet" ColorString="&amp;amp;C"></part>