Modding:Colors & Object Rendering: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
imported>CaptainTechnicality54384
imported>CaptainTechnicality54384
(Added in orange, cleaned up table source code to use color template)
Line 11: Line 11:
!
!
|-
|-
|r
| r
|dark red
| dark red
| colspan="1" |<span style="color: rgb(255,0,0);"> <span style="color: rgb(128,0,0);"></span> </span>
| {{color | r | █ }}
|-
|-
|R
| R
|bright red
| bright red
| colspan="1" |<span style="color: rgb(153,51,0);"> <span style="color: rgb(255,0,0);"></span> </span>
| {{color | R | █ }}
|-
|-
|w
| o
|brown
| dark orange
| colspan="1" |<span style="color: rgb(255,255,0);"> <span style="color: rgb(153,51,0);"></span> </span>
| {{color | o | █ }}
|-
|-
| colspan="1" |W
| O
| colspan="1" |yellow
| bright orange
| colspan="1" |<span style="color: rgb(51,204,204);"> <span style="color: rgb(255,255,0);"></span> </span>
| {{color | O | █ }}
|-
|-
| colspan="1" |c
| w
| colspan="1" |dark cyan
| brown
| colspan="1" |<span style="color: rgb(0,255,255);"> <span style="color: rgb(51,204,204);"></span> </span>
| {{color | w | █ }}
|-
|-
| colspan="1" |C
| W
| colspan="1" |bright cyan
| yellow
| colspan="1" |<span style="color: rgb(0,255,255);"></span>
| {{color | W | █ }}
|-
|-
| colspan="1" |b
| g
| colspan="1" |dark blue
| dark green
| colspan="1" |<span style="color: rgb(0,0,128);"></span>
| {{color | g | █ }}
|-
|-
| colspan="1" |B
| G
| colspan="1" |bright blue
| bright green
| colspan="1" |<span style="color: rgb(51,102,255);"></span>
| {{color | G | █ }}
|-
|-
| colspan="1" |g
| b
| colspan="1" |dark green
| dark blue
| colspan="1" |<span style="color: rgb(0,128,0);"></span>
| {{color | b | █ }}
|-
|-
| colspan="1" |G
| B
| colspan="1" |bright green
| bright blue
| colspan="1" |<span style="color: rgb(0,255,0);"></span>
| {{color | B | █ }}
|-
|-
| colspan="1" |m
| c
| colspan="1" |dark magenta
| dark cyan
| colspan="1" |<span style="color: rgb(128,0,128);"></span>
| {{color | c | █ }}
|-
|-
| colspan="1" |M
| C
| colspan="1" |bright magenta
| bright cyan
| colspan="1" |<span style="color: rgb(255,0,255);"></span>
| {{color | C | █ }}
|-
|-
| colspan="1" |y
| m
| colspan="1" |bright grey
| dark magenta
| colspan="1" |<span style="color: rgb(192,192,192);"></span>
| {{color | m | █ }}
|-
|-
| colspan="1" |Y
| M
| colspan="1" |white
| bright magenta
| colspan="1" |<span style="color: rgb(255,255,255);"></span>
| {{color | M | █ }}
|-
|-
| colspan="1" |k
| k
| colspan="1" |black
| black
| colspan="1" |<span style="color: rgb(0,0,0);"></span>
| {{color | k | █ }}
|-
|-
| colspan="1" |K
| K
| colspan="1" |dark grey
| dark grey
| colspan="1" |<span style="color: rgb(128,128,128);"></span>
| {{color | K | █ }}
|-
| y
| bright grey
| {{color | y | █ }}
|-
| Y
| white
| {{color | Y | }}
|}
|}



Revision as of 00:28, 16 June 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
o dark orange
O bright orange
w brown
W yellow
g dark green
G bright green
b dark blue
B bright blue
c dark cyan
C bright cyan
m dark magenta
M bright magenta
k black
K dark grey
y bright grey
Y white
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>