Module:Gradient/doc: Difference between revisions

From MuttWiki
Jump to navigationJump to search
Created page with "{{#invoke:Gradient|rgb|FF0000|0000FF|This module provides support for generating text gradients.}} It contains the following functions: == rgb == <pre><nowiki>{{#invoke:Gradient|rgb|<from>|<to>|<text>}}</nowiki></pre> {| class="wikitable" |+ Parameters |- ! Name !! Description |- | from || A 6-digit hex code for the start colour. (No starting <code>#</code>.) |- | to || A 6-digit hex code for the end colour. (No starting <code>#</code>.) |- | text || The text to apply t..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
== rgb ==
== rgb ==
<pre><nowiki>{{#invoke:Gradient|rgb|<from>|<to>|<text>}}</nowiki></pre>
<pre><nowiki>{{#invoke:Gradient|rgb|<from>|<to>|<text>}}</nowiki></pre>
{| class="wikitable"
* '''from:''' A 6-digit hex code for the start colour. No starting <code>#</code>.
|+ Parameters
* '''to:''' A 6-digit hex code for the end colour. No starting <code>#</code>.
|-
* '''text:''' The text to apply the gradient effect to. Plain text only.
! Name !! Description
Example: <code><nowiki>{{#invoke:Gradient|rgb|FF0000|0000FF|Hello world!}}</nowiki></code> &rarr; {{#invoke:Gradient|rgb|FF0000|0000FF|Hello world!}}
|-
 
| from || A 6-digit hex code for the start colour. (No starting <code>#</code>.)
== multi ==
|-
<pre><nowiki>{{#invoke:Gradient|multi|<colours>|<text>}}</nowiki></pre>
| to || A 6-digit hex code for the end colour. (No starting <code>#</code>.)
* '''colours:''' A comma-separated list of 6-digit hex codes. No starting <code>#</code>s.
|-
* '''text:''' The text to apply the gradient effect to. Plain text only.
| text || The text to apply the gradient effect to. Plain text only.
Example: <code><nowiki>{{#invoke:Gradient|multi|FF0000,FFFF00,00FF00,00FFFF,0000FF,FF00FF|Hello world!}}</nowiki></code> &rarr; {{#invoke:Gradient|multi|FF0000,FFFF00,00FF00,00FFFF,0000FF,FF00FF|Hello world!}}
|}

Latest revision as of 10:17, 22 February 2025

This module provides support for generating text gradients. It contains the following functions:

rgb[edit source]

{{#invoke:Gradient|rgb|<from>|<to>|<text>}}
  • from: A 6-digit hex code for the start colour. No starting #.
  • to: A 6-digit hex code for the end colour. No starting #.
  • text: The text to apply the gradient effect to. Plain text only.

Example: {{#invoke:Gradient|rgb|FF0000|0000FF|Hello world!}}Hello world!

multi[edit source]

{{#invoke:Gradient|multi|<colours>|<text>}}
  • colours: A comma-separated list of 6-digit hex codes. No starting #s.
  • text: The text to apply the gradient effect to. Plain text only.

Example: {{#invoke:Gradient|multi|FF0000,FFFF00,00FF00,00FFFF,0000FF,FF00FF|Hello world!}}Hello world!