Jump to content

Template:Value color/testcases

From Wikipedia, the free encyclopedia

RGB

[edit]
{{Value color|0|0|100|000000|FFFFFF}}
{{Value color}} rgb(0,0,0)
{{Value color/sandbox}} rgb(0,0,0)
{{Value color|50|0|100|000000|FFFFFF}}
{{Value color}} rgb(128,128,128)
{{Value color/sandbox}} rgb(128,128,128)
{{Value color|100|0|100|000000|FFFFFF}}
{{Value color}} rgb(255,255,255)
{{Value color/sandbox}} rgb(255,255,255)

As a CSS value

[edit]
<span style="color:{{Value color|25|25|100|FF0000|0000FF}}">Foo</span>
{{Value color}} Foo
{{Value color/sandbox}} Foo
<span style="color:{{Value color|50|25|100|FF0000|0000FF}}">Foo</span>
{{Value color}} Foo
{{Value color/sandbox}} Foo
<span style="color:{{Value color|75|25|100|FF0000|0000FF}}">Foo</span>
{{Value color}} Foo
{{Value color/sandbox}} Foo
<span style="color:{{Value color|100|25|100|FF0000|0000FF}}">Foo</span>
{{Value color}} Foo
{{Value color/sandbox}} Foo

Decimal

[edit]
{{Value color|0.5|0|1|000000|FFFFFF}}
{{Value color}} rgb(128,128,128)
{{Value color/sandbox}} rgb(128,128,128)

Hex output

[edit]
{{Value color|50|25|100|FF0000|0000FF|hex=y}}
{{Value color}} #aa0055
{{Value color/sandbox}} #aa0055
<span style="color:{{Value color|50|25|100|FF0000|0000FF|hex=y}}">Foo</span>
{{Value color}} Foo
{{Value color/sandbox}} Foo

Missing parameters

[edit]
{{Value color}}
{{Value color}} Parameters 1, 2, and 3 are required and must be numbers.
{{Value color/sandbox}} Parameters 1, 2, and 3 are required and must be numbers.
{{Value color|1|2}}
{{Value color}} Parameters 1, 2, and 3 are required and must be numbers.
{{Value color/sandbox}} Parameters 1, 2, and 3 are required and must be numbers.
{{Value color|1|2|apple}}
{{Value color}} Parameters 1, 2, and 3 are required and must be numbers.
{{Value color/sandbox}} Parameters 1, 2, and 3 are required and must be numbers.