Template:WikiStatusColours: Difference between revisions

why are decimals invalid for the rgb's, I ask you
(trying improved subtle colours)
(why are decimals invalid for the rgb's, I ask you)
Line 1: Line 1:
rgba({{#switch:{{{1|G}}}
rgba({{#switch:{{{1|G}}}
|B={{#ifexpr:{{{2|0}}}>=0|0,{{#expr:1.28*{{{2|0}}}-1}},{{#expr:-1.28*{{{2|0}}}+255}},|{{#expr:-0.64*{{{2|0}}}-1}},0,{{#expr:1.28*{{{2|0}}}+255}},}}
|B={{#ifexpr:{{{2|0}}}>=0|0,{{#expr:trunc(1.28*{{{2|0}}}-1)}},{{#expr:trunc(-1.28*{{{2|0}}}+255)}},|{{#expr:trunc(-0.64*{{{2|0}}}-1)}},0,{{#expr:trunc(1.28*{{{2|0}}}+255)}},}}
|G={{#ifexpr:{{{2|0}}}>=0|{{#expr:1.27*{{{2|0}}}}},255,0,|0,{{#expr:1.28*{{{2|0}}}+255}},{{#expr:-1.27*{{{2|0}}}}},}}
|G={{#ifexpr:{{{2|0}}}>=0|{{#expr:trunc(1.27*{{{2|0}}})}},255,0,|0,{{#expr:trunc(1.28*{{{2|0}}}+255)}},{{#expr:trunc(-1.27*{{{2|0}}})}},}}
|Y={{#ifexpr:{{{2|0}}}>=0|255,{{#expr:-1.28*{{{2|0}}}+255}},0,|{{#expr:1.28*{{{2|0}}}+255}},255,0,}}
|Y={{#ifexpr:{{{2|0}}}>=0|255,{{#expr:trunc(-1.28*{{{2|0}}}+255)}},0,|{{#expr:trunc(1.28*{{{2|0}}}+255)}},255,0,}}
|R={{#ifexpr:{{{2|0}}}>=0|255,0,{{#expr:1.27*{{{2|0}}}}},|255,{{#expr:-1.27*{{{2|0}}}}},0,}}
|R={{#ifexpr:{{{2|0}}}>=0|255,0,{{#expr:trunc(1.27*{{{2|0}}})}},|255,{{#expr:trunc(-1.27*{{{2|0}}})}},0,}}
}}{{#if:{{{3|}}}|0.125|1.0}})
}}{{#if:{{{3|}}}|0.125|1.0}})