Modding:Colors & Object Rendering
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="&Cb&Be&ba&cd&Ce&Bd&y bracelet" ColorString="&C"></part>