This is the
template sandbox page for
Template:HexShade (
diff). See also the companion subpage for test cases. |
This template uses Lua: |
This template takes an hex color code as first argument and a lightness between 0 and 1 as second argument, and returns a color with the same hue and saturation as the initial color but with its lightness overriden by the second argument.
{{HexShade|
Hex|
L}}
{{HexShade|
Hex|
L|
#}}
Code | Result |
---|---|
|
|
{{colorbox|#{{HexShade|FFEB00}}}} {{colorbox|{{HexShade|FFEB00||#}}}} Color alone (does nothing) |
|
{{colorbox|#{{HexShade|FFEB00|0.8}}}} {{colorbox|{{HexShade|FFEB00|0.8|#}}}} Color and lightness |
|
{{colorbox|#{{HexShade|#FFEB00|0.8}}}} {{colorbox|{{HexShade|#FFEB00|0.8|#}}}} Color and lightness, with leading # |
|
{{colorbox|#{{HexShade|{{party color|Independent Democratic Action}}|0.8}}}} {{colorbox|{{HexShade|{{party color|Independent Democratic Action}}|0.8|#}}}} Color and lightness, with leading # from {{ party color}} |
This is the
template sandbox page for
Template:HexShade (
diff). See also the companion subpage for test cases. |
This template uses Lua: |
This template takes an hex color code as first argument and a lightness between 0 and 1 as second argument, and returns a color with the same hue and saturation as the initial color but with its lightness overriden by the second argument.
{{HexShade|
Hex|
L}}
{{HexShade|
Hex|
L|
#}}
Code | Result |
---|---|
|
|
{{colorbox|#{{HexShade|FFEB00}}}} {{colorbox|{{HexShade|FFEB00||#}}}} Color alone (does nothing) |
|
{{colorbox|#{{HexShade|FFEB00|0.8}}}} {{colorbox|{{HexShade|FFEB00|0.8|#}}}} Color and lightness |
|
{{colorbox|#{{HexShade|#FFEB00|0.8}}}} {{colorbox|{{HexShade|#FFEB00|0.8|#}}}} Color and lightness, with leading # |
|
{{colorbox|#{{HexShade|{{party color|Independent Democratic Action}}|0.8}}}} {{colorbox|{{HexShade|{{party color|Independent Democratic Action}}|0.8|#}}}} Color and lightness, with leading # from {{ party color}} |