Modding:Colors & Object Rendering: Difference between revisions
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 | ||
| | | {{color | r | █ }} | ||
|- | |- | ||
|R | | R | ||
|bright red | | bright red | ||
| | | {{color | R | █ }} | ||
|- | |- | ||
| | | o | ||
| | | dark orange | ||
| | | {{color | o | █ }} | ||
|- | |- | ||
| | | O | ||
| | | bright orange | ||
| | | {{color | O | █ }} | ||
|- | |- | ||
| | | w | ||
| | | brown | ||
| | | {{color | w | █ }} | ||
|- | |- | ||
| | | W | ||
| | | yellow | ||
| | | {{color | W | █ }} | ||
|- | |- | ||
| | | g | ||
| dark green | |||
| | | {{color | g | █ }} | ||
|- | |- | ||
| | | G | ||
| bright green | |||
| | | {{color | G | █ }} | ||
|- | |- | ||
| | | b | ||
| dark blue | |||
| | | {{color | b | █ }} | ||
|- | |- | ||
| | | B | ||
| bright blue | |||
| | | {{color | B | █ }} | ||
|- | |- | ||
| | | c | ||
| dark cyan | |||
| | | {{color | c | █ }} | ||
|- | |- | ||
| | | C | ||
| bright cyan | |||
| | | {{color | C | █ }} | ||
|- | |- | ||
| | | m | ||
| | | dark magenta | ||
| | | {{color | m | █ }} | ||
|- | |- | ||
| | | M | ||
| | | bright magenta | ||
| | | {{color | M | █ }} | ||
|- | |- | ||
| k | |||
| black | |||
| | | {{color | k | █ }} | ||
|- | |- | ||
| | | K | ||
| | | dark grey | ||
| | | {{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;Cb&amp;Be&amp;ba&amp;cd&amp;Ce&amp;Bd&amp;y bracelet" ColorString="&amp;C"></part>