Home
Random
Log in
Settings
About the Deadlock Wiki
Search
Editing
Template
:
Color/doc
Give feedback
Warning:
You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more
.
Log in
or
create an account
to continue receiving notifications after this account expires, and to access other features.
Anti-spam check. Do
not
fill this in!
Retrieve's the color of a given key in any color format (default hex). ===Parameters=== {{Transclude|Module:Color/doc#Parameters}} ===Examples=== To retrieve the color alone <code><nowiki>{{Color|Tech}}</nowiki></code> {{Color|Tech|debug_mode=true}} To retrieve other color formats <code><nowiki>{{Color|Tech|rgb}}</nowiki></code> {{Color|Tech|rgb|debug_mode=true}} To style text: <code><nowiki><span style="color: {{Color|Weapon}};">Weapon colored text</span></nowiki></code> <span style="color: {{Color|Weapon}};">Weapon colored text</span> To style divs: <code><nowiki><div style="background-color: {{Color|Tech}};"> Tech colored div</div></nowiki></code> <div style="background-color: {{Color|Tech}};"> Tech colored div </div> To get the color without otherwise necessary prefix/postfix wrapping: <code><nowiki>{{Color|Tech|rgb|no_wrap=true}}</nowiki></code> {{Color|Tech|rgb|no_wrap=true|debug_mode=true}} This can manually be wrapped like <code><nowiki>rgba({{Color|Tech|no_wrap=true}}, 0.5)</nowiki></code> to customize the alpha channel (opacity/transparency) of the color to your liking. Note that with transparency, the color will vary on light or dark mode, so consider adding a white/black background behind to enforce consistency. To alter the alpha value using rgb dynamically: <code><nowiki><div style="background-color: rgba({{Color|Armor|rgb|no_wrap=true}}, 1.0);"> Armor colored div with 1.0 alpha</div></nowiki></code> <div style="background-color: rgba({{Color|Armor|rgb|no_wrap=true}}, 1.0);"> Armor colored div with 1.0 alpha </div> <code><nowiki><div style="background-color: rgba({{Color|Armor|rgb|no_wrap=true}}, 0.5);"> Armor colored div with 0.5 alpha</div></nowiki></code> <div style="background-color: rgba({{Color|Armor|rgb|no_wrap=true}}, 0.5);"> Armor colored div with 0.5 alpha </div> ===Previews=== {{Transclude|Module:Color/doc#Previews}} <noinclude>[[Category:Template documentation]]</noinclude>
Summary:
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Deadlock:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Pages included on this page:
Template:Color
(
edit
)
Template:MissingValveTranslationTooltip
(
edit
)
Template:Tooltip
(
edit
)
Template:Transclude
(
edit
)
Module:Color
(
edit
)
Module:Color/doc
(
edit
)
Module:Dictionary
(
edit
)
Module:Lang
(
edit
)
Module:Utilities
(
edit
)
Data:Dictionary
(
edit
)
Data:LangCodes.json
(
view source
) (⧼restriction-level-bot+⧽)
Data:Lang en.json
(
view source
) (⧼restriction-level-bot+⧽)