Last edited 3 years ago

Template:STYellow: Difference between revisions

Registered User
mNo edit summary
Registered User
(Merge articles)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
The [[Template:STYellow|STYellow]] template is used '''to color text''' in pages, with the STMicroelectronics corporate primary color {{STYellow|shade of yellow (█)}}.
The [[Template:STYellow|STYellow]] template is used '''to color text''' in pages, with the STMicroelectronics corporate primary color {{STYellow|shade of yellow (█)}}.


  Usage:  <nowiki>{{</nowiki>STYellow|{{HighlightParam|<text to color>}}}}
Where:
Where {{HighlightParam|<text to color>}} is the text to format in yellow. If this template is called with no text, the hexadecimal code of the color is returned.
  Usage:  <nowiki>{{</nowiki>STYellow|{{HighlightParam|<text to color>}}|tint={{HighlightParam|<tint>}}}}
*{{HighlightParam|<text to color>}} is the text to format in yellow. 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==
Line 16: Line 21:
|
|
This is a {{STYellow|STMicroelectronics corporate color: shade of yellow: &#9608;}}
This is a {{STYellow|STMicroelectronics corporate color: shade of yellow: &#9608;}}
|-
|  Coloring text in 75% tint of yellow
<pre style="white-space: pre-wrap;">
This is a {{STYellow|STMicroelectronics corporate color: 75% tint of yellow: &#9608; | tint=75}}
</pre>
|
This is a {{STYellow|STMicroelectronics corporate color: 75% tint of yellow: &#9608; | tint=75}}
|-
|  Coloring text in 50% tint of yellow
<pre style="white-space: pre-wrap;">
This is a {{STYellow|STMicroelectronics corporate color: 50% tint of yellow: &#9608; | tint=50}}
</pre>
|
This is a {{STYellow|STMicroelectronics corporate color: 50% tint of yellow: &#9608; | tint=50}}
|-
|  Coloring text in 25% tint of yellow
<pre style="white-space: pre-wrap;">
This is a {{STYellow|STMicroelectronics corporate color: 25% tint of yellow: &#9608; | tint=25}}
</pre>
|
This is a {{STYellow|STMicroelectronics corporate color: 25% tint of yellow: &#9608; | tint=25}}
|-
|-
| Getting the hexadecimal code of the color
| Getting the hexadecimal code of the color
Line 23: Line 49:
|
|
{{STYellow}} is the hexadecimal code of STMicroelectronics yellow.
{{STYellow}} is the hexadecimal code of STMicroelectronics yellow.
|-
| Getting the hexadecimal code of the 75% tint of the color
<pre style="white-space: pre-wrap;">
{{STYellow | tint=75}} is the hexadecimal code of STMicroelectronics 75% tint of yellow.
</pre>
|
{{STYellow | tint=75}} is the hexadecimal code of STMicroelectronics 75% tint of yellow.
|-
| Getting the hexadecimal code of the 50% tint of the color
<pre style="white-space: pre-wrap;">
{{STYellow | tint=50}} is the hexadecimal code of STMicroelectronics 50% tint of yellow.
</pre>
|
{{STYellow | tint=50}} is the hexadecimal code of STMicroelectronics 50% tint of yellow.
|-
| Getting the hexadecimal code of the 25% tint of the color
<pre style="white-space: pre-wrap;">
{{STYellow | tint=25}} is the hexadecimal code of STMicroelectronics 25% tint of yellow.
</pre>
|
{{STYellow | tint=25}} is the hexadecimal code of STMicroelectronics 25% tint of yellow.
|}
|}


Line 29: Line 76:
! You type !! You get
! You type !! You get
|-
|-
| Dark yellow and bold
| yellow and bold
<pre style="white-space: pre-wrap;">
<pre style="white-space: pre-wrap;">
This is a {{STYellow|'''STMicroelectronics'''}} corporate color: '''{{STYellow|shade of yellow: &#9608;}}'''
This is a {{STYellow|'''STMicroelectronics'''}} corporate color: '''{{STYellow|shade of yellow: &#9608;}}'''
Line 36: Line 83:
This is a {{STYellow|'''STMicroelectronics'''}} corporate color: '''{{STYellow|shade of yellow: &#9608;}}'''
This is a {{STYellow|'''STMicroelectronics'''}} corporate color: '''{{STYellow|shade of yellow: &#9608;}}'''
|-
|-
| Dark yellow and italic
| yellow and italic
<pre style="white-space: pre-wrap;">
<pre style="white-space: pre-wrap;">
This is a {{STYellow|''STMicroelectronics''}} corporate color: ''{{STYellow|shade of yellow: &#9608;}}''
This is a {{STYellow|''STMicroelectronics''}} corporate color: ''{{STYellow|shade of yellow: &#9608;}}''
Line 43: Line 90:
This is a {{STYellow|''STMicroelectronics''}} corporate color: ''{{STYellow|shade of yellow: &#9608;}}''
This is a {{STYellow|''STMicroelectronics''}} corporate color: ''{{STYellow|shade of yellow: &#9608;}}''
|}
|}
==Maintenance==
This template is a template common to all ST wikis. <br>
Modifications must be done into the [[stwikimodel:Template:STYellow|WikiModel]]. They must be reviewed by all  ST wikis maintainers.<br>
When approved, the template can be pushed/merged towards all ST wikis.


==Code==
==Code==
</noinclude>{{#if: {{{1|}}}|<span style="color: #FFD200;">{{{1}}}</span>|&#35;FFD200}}
</noinclude>{{#switch:{{{tint|none}}}
| 75 = {{#vardefine:tintval|FFDD40}}
| 50 = {{#vardefine:tintval|FFE87F}}
| 25 = {{#vardefine:tintval|FFF4BF}}
| #default = {{#vardefine:tintval|FFD200}}
}}{{#if: {{{1|}}}|<span style="color: #{{#var:tintval}};">{{{1}}}</span>|&#35;{{#var:tintval}}}}

Latest revision as of 18:01, 7 October 2021

1. Usage

The STYellow template is used to color text in pages, with the STMicroelectronics corporate primary color shade of yellow (█).

Where:

Usage:  {{STYellow|<text to color>|tint=<tint>}}
  • <text to color> is the text to format in yellow. 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

You type You get
Coloring text in yellow
This is a {{STYellow|STMicroelectronics corporate color: shade of yellow: █}}

This is a STMicroelectronics corporate color: shade of yellow: █

Coloring text in 75% tint of yellow
This is a {{STYellow|STMicroelectronics corporate color: 75% tint of yellow: █ | tint=75}}

This is a STMicroelectronics corporate color: 75% tint of yellow: █

Coloring text in 50% tint of yellow
This is a {{STYellow|STMicroelectronics corporate color: 50% tint of yellow: █ | tint=50}}

This is a STMicroelectronics corporate color: 50% tint of yellow: █

Coloring text in 25% tint of yellow
This is a {{STYellow|STMicroelectronics corporate color: 25% tint of yellow: █ | tint=25}}

This is a STMicroelectronics corporate color: 25% tint of yellow: █

Getting the hexadecimal code of the color
{{STYellow}} is the hexadecimal code of STMicroelectronics yellow.

#FFD200 is the hexadecimal code of STMicroelectronics yellow.

Getting the hexadecimal code of the 75% tint of the color
{{STYellow | tint=75}} is the hexadecimal code of STMicroelectronics 75% tint of yellow.

#FFD200 is the hexadecimal code of STMicroelectronics 75% tint of yellow.

Getting the hexadecimal code of the 50% tint of the color
{{STYellow | tint=50}} is the hexadecimal code of STMicroelectronics 50% tint of yellow.

#FFD200 is the hexadecimal code of STMicroelectronics 50% tint of yellow.

Getting the hexadecimal code of the 25% tint of the color
{{STYellow | tint=25}} is the hexadecimal code of STMicroelectronics 25% tint of yellow.

#FFD200 is the hexadecimal code of STMicroelectronics 25% tint of yellow.

3. More examples

You type You get
yellow and bold
This is a {{STYellow|'''STMicroelectronics'''}} corporate color: '''{{STYellow|shade of yellow: █}}'''

This is a STMicroelectronics corporate color: shade of yellow: █

yellow and italic
This is a {{STYellow|''STMicroelectronics''}} corporate color: ''{{STYellow|shade of yellow: █}}''

This is a STMicroelectronics corporate color: shade of yellow: █

4. Maintenance

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

#FFD200

No categories assignedEdit