v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Template:C/doc

From Dwarf Fortress Wiki
< Template:C
Revision as of 18:37, 5 December 2009 by Hussell (talk | contribs) (Created page with 'This template converts two case-insensitive hex digits into a style for the appropriate DF colors. The colors are: {| cellspacing=0 cellpadding=2 {{c|0|f}} |- {{c|f|0}} |0 |Black…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This template converts two case-insensitive hex digits into a style for the appropriate DF colors. The colors are:

0 Black #000000
1 Blue #000080
2 Green #008000
3 Cyan #008080
4 Red #800000
5 Magenta #800080
6 Brown #808000
7 Light Grey #c0c0c0
8 Dark Grey #808080
9 Light Blue #0000ff
A Light Green #00ff00
B Light Cyan #00ffff
C Light Red #ff0000
D Light Magenta #ff00ff
E Yellow #ffff00
F White #ffffff

For example, "{{c|f|3}}" produces "style=color:#fff;background-color:#008080", "{{c|7}}" produces "style=color:#c0c0c0;", and "<nowiki>style="background-color:#000;" produces "style=background-color:#000". Styles like this can be used in many places. In fact, this template was used to color the table rows above.