Template:Player reputation color: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(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)
m (Fixed another incorrect value that I missed the first time)
 
Line 1: Line 1:
<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>
<includeonly><span style="color: {{#ifexpr: {{{1}}} < -599 | #d74200 | {{#ifexpr: {{{1}}} < -249 | #a64a2e | {{#ifexpr: {{{1}}} < 250 | #77bfcf | {{#ifexpr: {{{1}}} < 600 | #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.

Latest revision as of 21:19, 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