Template:DFtext/doc

From Dwarf Fortress Wiki
< Template:DFtext
Revision as of 09:40, 14 September 2019 by Silverwing235 (talk | contribs) (*frown*)
Jump to navigation Jump to search

The DFtext template is designed to provide generally short preformatted text that resembles that of the game.

{{DFtext|Outside}} turns into Outside.
{{DFtext|Outside|3:1}} turns into Outside
{{DFtext|Outside|3:1:1}} turns into Outside.


This template mimics the 16 colors available to Dwarf Fortress. The format differs between 2 or 3 numbers being used. The format of the template is as follows:

{{DFtext|color:brightness}} or...
{{DFtext|background:color:brightness}}

There are 8 colors available, though each one has a dark and bright variation (0 and 1), adding up to 16 possible colors. Looking at the chart below will show which number refers to which color. Not including any numbers in the template defaults to light grey text on a black background - the background will also default to black if a third number is not included.

Alternatively, there is another, more complex format you can use to achieve the same text formatting. This is only helpful if this template doesn't provide a text (or highlight) color that's in the game. A CSS span style syntax can be used:

<span style="font-family:IBM Plex Mono Medium, Consolas, monospace; font-size:12.5px; background-color:#000; color:#91caff;">*TEXT GOES HERE*</span>

The example would provide the following: *TEXT GOES HERE*

This should only be a last resort, as this is a lot of text that can muddle up the flow of editing a page, therefore possibly adding more editing difficulty for other editors. Also, if there is a text color in the game that's very similar to a color this template can provide, it may be best to just use the next closest color from this template.

Values

Value Background Text
0              Test 
0:1              Test 
1              Test 
1:1              Test 
2              Test 
2:1              Test 
3              Test 
3:1              Test 
4              Test 
4:1              Test 
5              Test 
5:1              Test 
6              Test 
6:1              Test 
7              Test 
7:1              Test 
8+              Test