Difference between revisions of "Template:STPink"
[quality revision] | [quality revision] |
(Merge articles)
|
(Merge articles)
|
1 Usage[edit]
The STPink template is used to get the hexadecimal code of the color text in pages, with the STMicroelectronics corporate primary color shade of pink (█).
Usage: {{STPink|<text to color>|tint=<tint>}}
Where:
- <text to color> is the text to format in pink. If this template is called with no text, the hexadecimal code of the color is returned.
-
<tint> is the tint of the color expressed in percentage. If tint is not set then the original color is used (tint = 100%). The possible value are:
- 75: 75% of the original color tint
- 50: 50% of the original color tint
- 25: 25% of the original color tint
2 Basic examples[edit]
You type | You get |
---|---|
Coloring text in pink
This is a {{STPink|STMicroelectronics corporate color: shade of pink: █}}
|
This is a STMicroelectronics corporate color: shade of pink: █ |
Coloring text in 75% tint of pink
This is a {{STPink|STMicroelectronics corporate color: 75% tint of pink: █ | tint=75}}
|
This is a STMicroelectronics corporate color: 75% tint of pink: █ |
Coloring text in 50% tint of pink
This is a {{STPink|STMicroelectronics corporate color: 50% tint of pink: █ | tint=50}}
|
This is a STMicroelectronics corporate color: 50% tint of pink: █ |
Coloring text in 25% tint of pink
This is a {{STPink|STMicroelectronics corporate color: 25% tint of pink: █ | tint=25}}
|
This is a STMicroelectronics corporate color: 25% tint of pink: █ |
Getting the hexadecimal code of the color {{STPink}} is the hexadecimal code of STMicroelectronics pink. |
#E6007E is the hexadecimal code of STMicroelectronics pink. |
Getting the hexadecimal code of the 75% tint of the color
{{STPink | tint=75}} is the hexadecimal code of STMicroelectronics 75% tint of pink.
|
#EC409E is the hexadecimal code of STMicroelectronics 75% tint of pink. |
Getting the hexadecimal code of the 50% tint of the color
{{STPink | tint=50}} is the hexadecimal code of STMicroelectronics 50% tint of pink.
|
#F27FBE is the hexadecimal code of STMicroelectronics 50% tint of pink. |
Getting the hexadecimal code of the 25% tint of the color
{{STPink | tint=25}} is the hexadecimal code of STMicroelectronics 25% tint of pink.
|
#F8BCDD is the hexadecimal code of STMicroelectronics 25% tint of pink. |
3 More examples[edit]
You type | You get |
---|---|
Parameter is ignored pink and bold
This is a {{STPink|'''STMicroelectronics'''}} corporate color: '''{{STPink|shade of pink: █}}''' |
This is a STMicroelectronics corporate color: shade of pink: █ |
pink and italic
This is a {{STPink|''STMicroelectronics''}} corporate color: ''{{STPink|shade of pink: █}}''
|
This is a STMicroelectronics corporate color: shade of pink: █ |
4 Maintenance[edit]
This template is a template common to all ST wikis.
Modifications must be done into the WikiModel. They must be reviewed by all ST wikis maintainers.
When approved, the template can be pushed/merged towards all ST wikis.
5 Code[edit]
#E6007E
<noinclude> ==Usage== The [[Template:STPink|STPink]] template is used '''to get the hexadecimal code''' of color text''' in pages, with the STMicroelectronics corporate primary color <span style="color: {{STPink}};">{{STPink|shade of pink (█)</span>}}. Usage: <nowiki>{{</nowiki>STPink}} ==|{{HighlightParam|<text to color>}}|tint={{HighlightParam|<tint>}}}} Where: *{{HighlightParam|<text to color>}} is the text to format in pink. If this template is called with no text, the hexadecimal code of the color is returned. *{{HighlightParam|<tint>}} is the tint of the color expressed in percentage. If tint is not set then the original color is used (tint = 100%). The possible value are: **'''75''': 75% of the original color tint **'''50''': 50% of the original color tint **'''25''': 25% of the original color tint ==Basic examples== {| class="st-table" ! You type !! You get |- | Coloring text in pink<pre style="white-space: pre-wrap;"> This is a {{STPink|STMicroelectronics corporate color: shade of pink: █}}</pre> | This is a {{STPink|STMicroelectronics corporate color: shade of pink: █}} |- | Coloring text in 75% tint of pink<pre style="white-space: pre-wrap;"> This is a {{STPink|STMicroelectronics corporate color: 75% tint of pink: █ | tint=75}}</pre> | This is a {{STPink|STMicroelectronics corporate color: 75% tint of pink: █ | tint=75}} |- | Coloring text in 50% tint of pink<pre style="white-space: pre-wrap;"> This is a {{STPink|STMicroelectronics corporate color: 50% tint of pink: █ | tint=50}}</pre> | This is a {{STPink|STMicroelectronics corporate color: 50% tint of pink: █ | tint=50}} |- | Coloring text in 25% tint of pink<pre style="white-space: pre-wrap;"> This is a {{STPink|STMicroelectronics corporate color: 25% tint of pink: █ | tint=25}}</pre> | This is a {{STPink|STMicroelectronics corporate color: 25% tint of pink: █ | tint=25}} |- | Getting the hexadecimal code of the color<pre style="white-space: pre-wrap;"> {{STPink}} is the hexadecimal code of STMicroelectronics pink.</pre> | {{STPink}} is the hexadecimal code of STMicroelectronics pink. |} ==- | Getting the hexadecimal code of the 75% tint of the color<pre style="white-space: pre-wrap;"> {{STPink | tint=75}} is the hexadecimal code of STMicroelectronics 75% tint of pink.</pre> | {{STPink | tint=75}} is the hexadecimal code of STMicroelectronics 75% tint of pink. |- | Getting the hexadecimal code of the 50% tint of the color<pre style="white-space: pre-wrap;"> {{STPink | tint=50}} is the hexadecimal code of STMicroelectronics 50% tint of pink.</pre> | {{STPink | tint=50}} is the hexadecimal code of STMicroelectronics 50% tint of pink. |- | Getting the hexadecimal code of the 25% tint of the color<pre style="white-space: pre-wrap;"> {{STPink | tint=25}} is the hexadecimal code of STMicroelectronics 25% tint of pink.</pre> | {{STPink | tint=25}} is the hexadecimal code of STMicroelectronics 25% tint of pink. |} ==More examples== {| class="st-table" ! You type !! You get |- | Parameter is ignoredpink and bold <pre style="white-space: pre-wrap;"> This is a {{STPink|'''STMicroelectronics'''}} corporate color : '''{{STPink|shade of pink: █}}'''</pre> | This is a {{STPink|'''STMicroelectronics'''}} corporate color |}: '''{{STPink|shade of pink: █}}''' |- | pink and italic<pre style="white-space: pre-wrap;"> This is a {{STPink|''STMicroelectronics''}} corporate color: ''{{STPink|shade of pink: █}}''</pre> | This is a {{STPink|''STMicroelectronics''}} corporate color: ''{{STPink|shade of pink: █}}'' |} ==Maintenance== This template is a template common to all ST wikis. <br> Modifications must be done into the [[stwikimodel:Template:STPink|WikiModel]]. They must be reviewed by all ST wikis maintainers.<br> When approved, the template can be pushed/merged towards all ST wikis. ==Code==</noinclude>#E6007E{{#switch:{{{tint|none}}} | 75 = {{#vardefine:tintval|EC409E}} | 50 = {{#vardefine:tintval|F27FBE}} | 25 = {{#vardefine:tintval|F8BCDD}} | #default = {{#vardefine:tintval|E6007E}} }}{{#if: {{{1|}}}|<span style="color: #{{#var:tintval}};">{{{1}}}</span>|#{{#var:tintval}}}}
Line 1: | Line 1: | ||
<noinclude> |
<noinclude> |
||
==Usage== |
==Usage== |
||
− | The [[Template:STPink|STPink]] template is used '''to |
+ | The [[Template:STPink|STPink]] template is used '''to color text''' in pages, with the STMicroelectronics corporate primary color {{STPink|shade of pink (█)}}. |
− | Usage: <nowiki>{{</nowiki>STPink}} |
+ | Usage: <nowiki>{{</nowiki>STPink|{{HighlightParam|<text to color>}}|tint={{HighlightParam|<tint>}}}}
|
+ | Where: |
||
+ | *{{HighlightParam|<text to color>}} is the text to format in pink. If this template is called with no text, the hexadecimal code of the color is returned. |
||
+ | *{{HighlightParam|<tint>}} is the tint of the color expressed in percentage. If tint is not set then the original color is used (tint = 100%). The possible value are: |
||
+ | **'''75''': 75% of the original color tint |
||
+ | **'''50''': 50% of the original color tint |
||
+ | **'''25''': 25% of the original color tint |
||
==Basic examples== |
==Basic examples== |
||
{| class="st-table" |
{| class="st-table" |
||
! You type !! You get |
! You type !! You get |
||
+ | |- |
||
+ | | Coloring text in pink |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | This is a {{STPink|STMicroelectronics corporate color: shade of pink: █}} |
||
+ | </pre> |
||
+ | | |
||
+ | This is a {{STPink|STMicroelectronics corporate color: shade of pink: █}} |
||
+ | |- |
||
+ | | Coloring text in 75% tint of pink |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | This is a {{STPink|STMicroelectronics corporate color: 75% tint of pink: █ | tint=75}} |
||
+ | </pre> |
||
+ | | |
||
+ | This is a {{STPink|STMicroelectronics corporate color: 75% tint of pink: █ | tint=75}} |
||
+ | |- |
||
+ | | Coloring text in 50% tint of pink |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | This is a {{STPink|STMicroelectronics corporate color: 50% tint of pink: █ | tint=50}} |
||
+ | </pre> |
||
+ | | |
||
+ | This is a {{STPink|STMicroelectronics corporate color: 50% tint of pink: █ | tint=50}} |
||
+ | |- |
||
+ | | Coloring text in 25% tint of pink |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | This is a {{STPink|STMicroelectronics corporate color: 25% tint of pink: █ | tint=25}} |
||
+ | </pre> |
||
+ | | |
||
+ | This is a {{STPink|STMicroelectronics corporate color: 25% tint of pink: █ | tint=25}} |
||
|- |
|- |
||
| Getting the hexadecimal code of the color |
| Getting the hexadecimal code of the color |
||
Line 15: | Line 49: | ||
| |
| |
||
{{STPink}} is the hexadecimal code of STMicroelectronics pink. |
{{STPink}} is the hexadecimal code of STMicroelectronics pink. |
||
+ | |- |
||
+ | | Getting the hexadecimal code of the 75% tint of the color |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | {{STPink | tint=75}} is the hexadecimal code of STMicroelectronics 75% tint of pink. |
||
+ | </pre> |
||
+ | | |
||
+ | {{STPink | tint=75}} is the hexadecimal code of STMicroelectronics 75% tint of pink. |
||
+ | |- |
||
+ | | Getting the hexadecimal code of the 50% tint of the color |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | {{STPink | tint=50}} is the hexadecimal code of STMicroelectronics 50% tint of pink. |
||
+ | </pre> |
||
+ | | |
||
+ | {{STPink | tint=50}} is the hexadecimal code of STMicroelectronics 50% tint of pink. |
||
+ | |- |
||
+ | | Getting the hexadecimal code of the 25% tint of the color |
||
+ | <pre style="white-space: pre-wrap;"> |
||
+ | {{STPink | tint=25}} is the hexadecimal code of STMicroelectronics 25% tint of pink. |
||
+ | </pre> |
||
+ | | |
||
+ | {{STPink | tint=25}} is the hexadecimal code of STMicroelectronics 25% tint of pink. |
||
|} |
|} |
||
Line 21: | Line 76: | ||
! You type !! You get |
! You type !! You get |
||
|- |
|- |
||
− | | |
+ | | pink and bold
|
+ | <pre style="white-space: pre-wrap;"> |
||
+ |
This is a {{STPink|'''STMicroelectronics'''}} corporate color: '''{{STPink|shade of pink: █}}'''
|
||
+ | </pre> |
||
+ | | |
||
+ | This is a {{STPink|'''STMicroelectronics'''}} corporate color: '''{{STPink|shade of pink: █}}''' |
||
+ | |- |
||
+ | | pink and italic |
||
<pre style="white-space: pre-wrap;"> |
<pre style="white-space: pre-wrap;"> |
||
− | This is a {{STPink| |
+ | This is a {{STPink|''STMicroelectronics''}} corporate color: ''{{STPink|shade of pink: █}}''
|
</pre> |
</pre> |
||
| |
| |
||
− | This is a {{STPink| |
+ | This is a {{STPink|''STMicroelectronics''}} corporate color: ''{{STPink|shade of pink: █}}''
|
|} |
|} |
||
Line 35: | Line 97: | ||
==Code== |
==Code== |
||
− | </noinclude># |
+ | </noinclude>{{#switch:{{{tint|none}}}
|
+ | | 75 = {{#vardefine:tintval|EC409E}} |
||
+ | | 50 = {{#vardefine:tintval|F27FBE}} |
||
+ | | 25 = {{#vardefine:tintval|F8BCDD}} |
||
+ | | #default = {{#vardefine:tintval|E6007E}} |
||
+ |
}}{{#if: {{{1|}}}|<span style="color: #{{#var:tintval}};">{{{1}}}</span>|#{{#var:tintval}}}}
|