Modding:Colors & Object Rendering
This page is about modding. See the modding overview for an abstract on modding. |
Overview
Colors are defined in Display.txt
.
Each color is defined by a single letter. &
means to set the foreground color, ^
means to set the background color.
Code | Name | Hex | |
---|---|---|---|
r | dark red / crimson | #a64a2e | █ |
R | red / scarlet | #d74200 | █ |
o | dark orange | #f15f22 | █ |
O | orange | #e99f10 | █ |
w | brown | #98875f | █ |
W | gold / yellow | #cfc041 | █ |
g | dark green | #009403 | █ |
G | green | #00c420 | █ |
b | dark blue | #0048bd | █ |
B | blue / azure | #0096ff | █ |
c | dark cyan / teal | #40a4b9 | █ |
C | cyan | #77bfcf | █ |
m | dark magenta / purple | #b154cf | █ |
M | magenta | #da5bd6 | █ |
k | #0f3b3a | █ | |
K | dark grey / black | #155352 | █ |
y | grey | #b1c9c3 | █ |
Y | white | #ffffff | █ |
To get a palette file for these colors, refer to Visual_Style#Palette.
In XML files, such as ObjectBlueprints.xml, the ampersand (&) must be replaced by the encoded ampersand (&)
Prefix | Text | Xml |
---|---|---|
Foreground | &<code> | &<code> |
Background | ^<code> | ^<code> |
Render Part
ColorString contains the foreground and (optionally) the background string for the ascii and tiles. Examples: &B
or &B^r
TileColor is identical to ColorString, but applies only to tiles. If this is not specified, a tile falls back to using the ColorString.
DetailColor changes the "third" color used only for tiles, not the ascii. DetailColor is always just a single character. Example: g
So ColorString="&M^g"
would be foreground bright magenta with a background color of green,
Like this!
If you want to color an item's 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>
The qud-colorgen utility (created by crayon) is an external tool that can help you create these complex color strings, however the newer Markup language the game uses might be good enough for your purposes.
Note that if a detail color is not specified, it will default to the background viridian color.
Color Markup Language
Most default text in the game is colored grey (&y), so you'll often see an &y
at the end of strings to reset the color back to normal. When putting strings using the basic color codes together to make sentences extremely confusing color bleed becomes possible. Because of this there is new system which parses text in double curly braces: {{color|text}}
. If you want to ensure colors "return" to what they were set to, you can leave out the color. "{{|&RThis text is red}} and this will be whatever the color was before red"
In general, every string for rendering, except the color string/detail color on render part should use the new Markup language.
Text can also be colored as follows using any of the color templates defined in StreamingAssets\Base\Colors.xml.
{{color template|your text to color here}}
List of possible templates
Shader | Colors | Type |
---|---|---|
hologram | b-B-C-c | sequence |
ydfreehold | r-R-k-c-C-W-W-C-c-r-R | sequence |
purple | m | sequence |
paisley | m-M-Y-M-m | sequence |
biomech | w-w-r-r-r-w-r-r | sequence |
azure | B | sequence |
keybind | W | sequence |
rainbow | r-R-W-G-B-b-m | alternation |
important | W | sequence |
metamorphic | y-y-y-Y-Y-Y-M-M-M-m-m-m-m | sequence |
transkinetic | Y-C-C-c-y-K-K-y-R-W-W-Y | sequence |
dark red | r | sequence |
ubernostrum | c-g-G-W-w-c-C-G-g-w-W | sequence |
desert camouflage | w-w-W-w-K-w-w-W-W-K | sequence |
rocket | Y-W-R-R-r-y | alternation |
rubbergum | W-W-w-w-y-y-Y-W-W | sequence |
visage | R-r-b-B-Y-y | sequence |
dark keybind | w | sequence |
snail-encrusted | w-W-Y-y | sequence |
dreamsmoke | b-b-b-b-y-Y-Y-W-w-b-b-b | sequence |
polarized | K-y-Y-y-K-y-Y-y-K | alternation |
ironshank | K-y-Y-y | sequence |
gold | W | sequence |
dark fiery | r-R-W-R-r | alternation |
bethsaida | w-W-C-c-m-c-C-W-w | sequence |
filthy | w-w-K-w-K-w-W | sequence |
sun | W-R-W | alternation |
pearly | Y-Y-y | sequence |
cider | r | solid |
engraved | Y-y-c-C | sequence |
coated in plasma | K-K-y-g-G-Y-k-Y-Y-k-Y-G-g-y-K-K | sequence |
gaslight | g-g-w-W-w-g-g | alternation |
entropic | K-K-m-K-K-K-m-m-K-K-y | sequence |
neutronic | B-b-K-y-Y | sequence |
lanterned | y-y-y-y-Y-W-Y-y-y | alternation |
dark magenta | m | sequence |
scarlet | R | sequence |
overloaded | y-y-w-W-R-W-w-y-y | alternation |
dark blue | b | sequence |
red | R | sequence |
patchwork | W-w-r-R-W-w-b-B-W | sequence |
nanotech | K-K-y-K | sequence |
brainbrine | g-g-g-w-W-W-W-w-g-g-g | sequence |
teal | c | sequence |
bee | K-w-W-Y-W-w-K | alternation |
cryogenic | Y-C-C-Y-c-c-K-y-Y | sequence |
eater | Y-Y-M-Y-Y-Y | sequence |
C | C | sequence |
B | B | sequence |
G | G | sequence |
dark orange | o | sequence |
feathered | C-B-b-g-G-g-b-B-C | alternation |
K | K | sequence |
M | M | sequence |
O | O | sequence |
internals | W | solid |
R | R | sequence |
prismatic | r-R-W-G-B-b-m | sequence |
W | W | sequence |
lovesickness | r-R-M-m-r-R-M | sequence |
Y | Y | sequence |
fiery | R | sequence |
urban camouflage | y-y-K-y-K-y-y-K-y-K | sequence |
crimson | r | sequence |
leopard | W-W-w-w-W-K-K-w-w-W-W | sequence |
glittering | K-K-y-M-y-K-K | sequence |
ghostly | Y-Y-y-y-K-K | alternation |
palladium mesh | c-c-c-c-C-W-Y-W-C | sequence |
tarnished | G-G-g | sequence |
c | c | sequence |
b | b | sequence |
shimmering | Y-Y-y-y-K-K-y-y | sequence |
qon | m-b-B | sequence |
g | g | sequence |
lava | R | solid |
earth | b-B-W-g-G | sequence |
shugruith | K-y-W-w-m-w-W-y-K | sequence |
k | k | sequence |
peridot | G-g-w-W-Y-W-G | sequence |
m | m | sequence |
agolgot | K-g-w-m-w-g-K | sequence |
o | o | sequence |
nectar | W-w-g-G | sequence |
zetachrome | m-M-Y-C-c-c-C-Y-M-m | alternation |
watery | B-C-Y-C-B | alternation |
turbow | K-y-Y-Y-R-r | sequence |
r | r | sequence |
plasma | g-G-Y-Y-G-g | sequence |
love | Y-R-Y-Y | sequence |
w | w | sequence |
thermo | R-R-r-c-b-B-B | sequence |
y | y | sequence |
telemetric | K-y-c-C-Y-W-C-c-y-K | alternation |
black | K | sequence |
tartan | y-K-g-G-K-R-r-K-y | sequence |
psychalflesh | w-w-w-r-R-M-M-m-M-M-R-r-w-w-w-w | sequence |
yellow | W | sequence |
mirrorshades | K-y-Y-Y-y-K | sequence |
white | Y | sequence |
sunset | b-B-B-M-m-r-R-W-C-C-W-R-r-m-M-B-B-b | alternation |
metachrome | w-W-Y-C-c-c-C-Y-W-w | alternation |
sunslag | r-W-Y-Y-Y-W-r | sequence |
structural | Y-y-K-y-Y | alternation |
psymeridian | K-K-y-y-y-m-M-M-M-M-m-y-y-y-K-K | sequence |
starry | K-Y-K-K-Y-K | sequence |
extradimensional | M-M-m-m-y-y-Y-Y-O-Y-Y-y-m-m-M-M | alternation |
sphynx | C-c-m-M | sequence |
blaze | r-r-R-W-Y | sequence |
putrid | K | solid |
amorous | r-R-M-m | alternation |
spiked | R-Y | bordered |
spaser | K-g-G-G-g-K | sequence |
ninefold | b-B | bordered |
slimy | g | solid |
skulk | b-b-B-b-b | sequence |
silvery | Y | sequence |
magenta | M | sequence |
mercurial | c-c-C-W-Y-W-C-c-c | alternation |
graffitied | R-r-w-W-Y-y-r-R-W-w | sequence |
shemesh | r-r-R-R-W-W-Y | sequence |
soul | W-w-c-C-Y-C-c-w-W | alternation |
shade | y-K-c-b-B-y-C-y-K | sequence |
dark gray | K | sequence |
snakeskin | g-c-C-G | sequence |
rusty | r | sequence |
playernotes | Y | solid |
green | G | sequence |
fungicide | M-M-R-r-K-r-R | sequence |
scaled | g-G-W-w-g-G | sequence |
hotkey | W | solid |
gray | y | sequence |
jungle | g-g-w-G-g-m-g-w-w-K-g-m-G-G-w | sequence |
rules | C | solid |
cloning | Y-Y-Y-Y-Y-Y-M-Y-M-Y-Y-Y-Y-Y-Y | sequence |
lacquered | Y-y-K-y-Y-y-K-y-Y-y | sequence |
chiral | B-b-c-C-M-m-k-m-M-C-c-b | sequence |
refractive | y-Y | sequence |
bio | g-G-W-M-W-G-g-g-g-g-g | sequence |
icy | Y-C-B-C-Y | alternation |
arctic camouflage | y-y-Y-y-K-y-y-Y-Y-K | sequence |
spring-turret | c-c-C-C-y-y-y-y-y-C-C-c-c | sequence |
glotrot | K-K-r-R-r | sequence |
psionic | b-B-C-c-b-B-C | alternation |
plastifer | K-y-Y-y | sequence |
crystalline | m-m-m-b-B-Y-B-b-m-m-m | sequence |
rermadon | Y-G-g-m-m-g-G-Y | sequence |
resonance | c-c-C-C-W-C-C-c-c | alternation |
crochide | g-g-g-g-g-G | sequence |
plaid | g-K-G-W-G | sequence |
syphon | c-c-c-C-W-Y | sequence |
brown | w | sequence |
quantum | m-m-m-m-m-m-m-Y-Y-Y-Y-Y | sequence |
olive | g-g-G-W-w | sequence |
beylah | B-b-g-k-W-R-r | sequence |
freezing | C | sequence |
astral | Y-y-K-y-Y | alternation |
sparkling | y-y-Y | sequence |
nervous | g-g-w-W-w-g-g | sequence |
nanoneuro | r-R-G-g-K-K-g-G-R-r-g | sequence |
horned | y-W | bordered |
defoliant | W-W-G-g-K-g-G | sequence |
moon | b-B-C-c | sequence |
sickly | g-r-m-w-K-G-g-c-K | sequence |
painted | r-R-W-w-g-G-B | sequence |
kesil | m-m-M-Y-y | sequence |
kaleidoslug | K-C-y-m-M-r-c-C-Y-y-K | sequence |
dark cyan | c | sequence |
dark green | g | sequence |
radiant | r-W-Y-Y-Y-W-r | sequence |
leafy | g-g-G | sequence |
qas | C-c-m | sequence |
lah | w-W-R-r | sequence |
issachari | Y-Y-Y-Y-Y-Y-r | sequence |
normalish | y-y-K-y-Y-y-y-y-K-y-Y | sequence |
illuminated | c-c-c-C-Y-W-Y-C | sequence |
levant | r-r-y-y-Y-Y | sequence |
emote | w | solid |
hypertractor | r-R-W-w-c-C-B-b | sequence |
great machine | c-c-C-Y-W-k-W-Y-C-c-c-c-c | sequence |
normal | K-K-y-y-Y-y-y-K-K-y-K-y-Y | sequence |
forest | g-g-w-G-g-g-w-w-g-G-G-w | sequence |
blue | B | sequence |
electrical | W | sequence |
hypervelocity | r-R-W-Y-W-R-r | alternation |
dreamy | b-b-b-B-M-k-W-M-B-b-b-b-b | sequence |
crysteel | y-y-K-g-g-K-y-y | alternation |
cloudy | y-y-Y-y-Y-Y | sequence |
phase-harmonic | Y-y-m-y-K | sequence |
camouflage | g-g-G-g-K-g-g-G-G-K | sequence |
implanted | r-r-r-r-r-r-r-C | sequence |
auroral | K-g-G-Y-G-g-K | sequence |
opalescent | Y-y-K-K-y-Y | sequence |
orange | O | sequence |
otherpearl | M-m-y-Y-O-O-Y-y-m-M | sequence |
cyan | C | sequence |
Unique Templates
These shaders do not show up in StreamingAssets\Base\Colors.xml, and do not use any of the standard shader types. Instead, they are defined directly in the C# assembly under ConsoleLib.Console.MarkupShaders
.
Shader | Description |
---|---|
chaotic | Gives each character a random color. |
random | Gives the entire string a random color. |
For both of these shaders, the colors are re-rolled every time the game gets the foreground color of the text. In addition, both of these shaders only use vanilla colors (and their overwrites), modded colors assigned to non-vanilla character codes aren't used.
Anonymous Templates
To create a temporary template, the format is:
{{[color pattern delimited by -] [type]|[text]}}
For example:
{{R-R-R-R-R-M-M sequence|mumble mouth}}
The list of possible types are:
Type | Pattern | Example |
---|---|---|
solid | Colors the entire string using only the first color of the pattern. | texttexttexttext |
sequence | Repeats the pattern. | texttexttexttext |
alternation | Stretches the pattern so it fits the entire word. | texttexttexttext |
bordered | Colors the first and last characters using the second color in the pattern, and colors all other characters using the first color of the pattern. | texttexttexttext |
distribution | Colors each character using a random color from the pattern. Not used by any of the vanilla templates. |
Custom Colors
To define your own colors, include a file called Display.txt
in your mod. Inside it, put the following:
{
"colors":{
"X":"FFFFFF"
}
}
From there, replace X
with the character you want to represent your new color, and FFFFFF
with the hex code of the new color.
If you want to overwrite a vanilla color, add a new color that uses the same character as the vanilla color you want to overwrite.
You can also add multiple new colors by adding them to the list, as shown here:
"colors":{
"X":"FFFFFF",
"p":"000000"
}
See Also
|