Template:Player reputation color: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
(Fixed some incorrect values for the thresholds between different colors, and updated the neutral reputation color to be light cyan (#77bfcf), as it appears in-game, instead of white)
Line 1: Line 1:
<includeonly><span style="color: {{#ifexpr: {{{1}}} < -601 | #d74200 | {{#ifexpr: {{{1}}} < -250 | #a64a2e | {{#ifexpr: {{{1}}} < 250 | #FFFFFF | {{#ifexpr: {{{1}}} < 601 | #009403 | #00c420 }} }} }} }};">'''{{{1}}}'''</span></includeonly><noinclude>
<includeonly><span style="color: {{#ifexpr: {{{1}}} < -599 | #d74200 | {{#ifexpr: {{{1}}} < -249 | #a64a2e | {{#ifexpr: {{{1}}} < 250 | #77bfcf | {{#ifexpr: {{{1}}} < 599 | #009403 | #00c420 }} }} }} }};">'''{{{1}}}'''</span></includeonly><noinclude>
[[Category:Templates]]
[[Category:Templates]]
You probably shouldn't be calling this unless you're writing a template.
You probably shouldn't be calling this unless you're writing a template.


Usage: <code><nowiki>{{Player reputation color|-375}}</nowiki></code>
Usage:
<br>
<code><nowiki>{{Player reputation color|-600}}</nowiki></code>
<br>
<code><nowiki>{{Player reputation color|-250}}</nowiki></code>
<br>
<code><nowiki>{{Player reputation color|0}}</nowiki></code>
<br>
<code><nowiki>{{Player reputation color|250}}</nowiki></code>
<br>
<code><nowiki>{{Player reputation color|600}}</nowiki></code>
 


Output:
Output:
{{Player reputation color|-375}}
<br>
{{Player reputation color|-600}}
<br>
{{Player reputation color|-250}}
<br>
{{Player reputation color|0}}
<br>
{{Player reputation color|250}}
<br>
{{Player reputation color|600}}
</noinclude>
</noinclude>

Revision as of 21:17, 20 March 2020

You probably shouldn't be calling this unless you're writing a template.

Usage:
{{Player reputation color|-600}}
{{Player reputation color|-250}}
{{Player reputation color|0}}
{{Player reputation color|250}}
{{Player reputation color|600}}


Output:
-600
-250
0
250
600