• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.172
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Translate name rgb

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]

This is a utility template for translating color name to RGB hex triplet. This is created primarily because the color entry of CSS attribute fails to ignore the number sign (#) when the entry is color name instead of the hex triplet. But unlike the deprecated <font> element and color attribute where the number sign is dispensable when entering hex triplet. This creates a dilemma when translating the template syntax from deprecated style definitions to CSS, the system fails to recognize some (mass) of the parameter entries from the transcluding pages due to the presence or absence of the number sign.

Usage

Only 1 parameter is available in this template:

  • {{Translate name rgb|blue}} gives "0000FF".

Note

Since Wikipedia has not yet implemented the REPLACE string function, user of this template must remove all whitespace or underscore if any in between the term (e.g. dark blue becomes darkblue.) However, this template is not case-sensitive.

The above documentation is transcluded from Template:Translate name rgb/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Translate_name_rgb&oldid=33946"
Category:
  • Color templates
Last edited on 8 March 2013, at 12:35

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 8 March 2013, at 12:35.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop