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.

Difference between revisions of "Template:C/doc"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(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…')
 
m
Line 67: Line 67:
 
|}
 
|}
  
For example, "<nowiki>{{c|f|3}}</nowiki>" produces "style=color:#fff;background-color:#008080", "<nowiki>{{c|7}}</nowiki>" produces "style=color:#c0c0c0;", and "<nowiki>{{c||0}} 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.
+
For example, "<nowiki>{{c|f|3}}</nowiki>" produces "style=color:#fff;background-color:#008080", "<nowiki>{{c|7}}</nowiki>" produces "style=color:#c0c0c0;", and "<nowiki>{{c||D}}</nowiki>" produces "style=background-color:#f0f". Styles like this can be used in many places. In fact, this template was used to color the table rows above. "<nowiki><span {{c|f|0}}>white text on a black background</span></nowiki>" can be used to color small amounts of text, but the major use is in coloring tables, table rows, and table cells for ASCII diagrams.

Revision as of 18:42, 5 December 2009

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 "{{c||D}}" produces "style=background-color:#f0f". Styles like this can be used in many places. In fact, this template was used to color the table rows above. "<span {{c|f|0}}>white text on a black background</span>" can be used to color small amounts of text, but the major use is in coloring tables, table rows, and table cells for ASCII diagrams.