Colors
Sage includes support for foreground and background colors.
For example, you might want to use red text for a strong warning:
[red]*Caution:*[end] this feature has not been tested yet!
The above produces…
Caution:
this feature has not been tested yet!
Sage offers ten theme-specific colors,
which change based on the user's theme…
Generally, any of these colors is readable
as a foreground color against the theme's background.
However, in the light theme, white doesn't contrast very
well with the
background.
- black
- gray
- white
- red
- orange
- brown
- yellow
- green
- blue
- purple
black
gray
white
red
orange
brown
yellow
green
blue
purple
The [color] tag allows you to control
either or both of the foreground and background colors,
using the fg and bg attributes…
This text is [color fg=white bg=orange]white on orange[end][br]
This text is [color fg=brown bg=black]brown on black[end][br]
This text is [color fg=yellow bg=blue]yellow on blue[end][br]
The above produces…
This text is
This text is
This text is
You can omit the attributes,
and specify only a foreground color…
This is [color orange]orange text[end][br]
This is [color blue]blue text[end][br]
This is [color purple]purple text[end][br]
The above produces…
This is
This is
This is
This text is
white on orange
This text is
brown on black
This text is
yellow on blue
This is
orange text
This is
blue text
This is
purple text
The [color] tag also supports Web colors,
which are not theme-sensitive.
To use a web color, simply include a pound sign…
This is [color #orange]orange text[end][br]
This is [color #blue]blue text[end][br]
This is [color #purple]purple text[end][br]
This is [color #salmon]salmon text[end][br]
This is [color #39E]#39E text[end][br]
This is [color #DF3291]#DF3291 text[end][br]
The above produces…
This is
This is
This is
This is
This is
This is
As the above example shows, you can use any web color,
by name or numerically.
This is
orange text
This is
blue text
This is
purple text
This is
salmon text
This is
#39E text
This is
#DF3291 text
 * * * * * * 
   * * * * *
 * * * * * * 
   * * * * *
 * * * * * * 
   * * * * *
 * * * * * * 
   * * * * *
 * * * * * * 
⏱ Last Modified: 10/24 10:44:32 am