Difference: TextFormattingFAQ (11 vs. 12)

Revision 122002-02-22 - PeterThoeny

Line: 1 to 1
 Text Formatting FAQ

The most frequently asked questions about text formatting are answered. Also, TextFormattingRules contains the complete TWiki shorthand system on one quick reference page.

Line: 143 to 143
 

Can I write colored text?

Changed:
<
<
Sure. The quickest way is to go <font color="colorCode">colorize</font> - font is an HTML tag that works in any browser, although it's been phased out in the latest HTML specs.
>
>
TWikiPreferences defines some commonly used colors: %YELLOW%, %RED%, %PINK%, %PURPLE%, %TEAL%, %NAVY%, %BLUE%, %AQUA%, %LIME%, %GREEN%, %OLIVE%, %MAROON%, %BLACK%, %GRAY%, %SILVER% and %ENDCOLOR%.
 
Changed:
<
<
You can also use the up-to-date style attribute - ex: style="color:#ff0000" - placed in most HTML tags. span is an all-purpose choice: "<span style="color:#ff0000">CoLoR</span>. Only old (like 3.x IE & NS) browsers have a problem with style.
>
>
  • You enter: %RED% red text %ENDCOLOR% and %GREEN% green text %ENDCOLOR%

    Result: red text and green text

 
Changed:
<
<
"colorCode" is the hexadecimal RGB color code, which is simply Red, Green and Blue values in hex notation (base 16, 0-F). For pure red, the RGB components are 255-0-0 - full red (255), no green or blue. That's FF-0-0 in hex, or "#ff000=" for Web page purposes. For a basic color selection (you can StandardColor names instead of hex code in the =font tag only):
>
>
Note: %<color>% text must end with %ENDCOLOR% . If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
 
Changed:
<
<
Black: "#000000" Green: "#008000" Silver: "#c0c0c0" Lime: "#00ff00"
Gray: "#808080" Olive: "#808000" White: "#ffffff" Yellow: "#ffff00"
Maroon: "#800000" Navy: "#000080" Red: "#ff0000" Blue: "#0000ff"
Purple: "#800080" Teal: "#008080" Fuchsia: "#ff00ff" Aqua: "#00ffff"
>
>
If you need more colors you can use HTML, like <font color="#ff0000"> red text </font>. You can also use the up-to-date style attribute - ex: style="color:#ff0000" - placed in most HTML tags. span is an all-purpose choice: <span style="color:#ff0000">CoLoR</span>. Only old (like 3.x IE & NS) browsers have a problem with style.
 
Changed:
<
<
  • You enter: <font color="#ff0000"> Red color </font> draws attention.

    Result: Red color draws attention.

>
>
The code is the hexadecimal RGB color code, which is simply Red, Green and Blue values in hex notation (base 16, 0-F). For pure red, the RGB components are 255-0-0 - full red (255), no green or blue. That's FF-0-0 in hex, or "#ff000" for Web page purposes. StandardColors lists basic colors.
 
Changed:
<
<
-- PeterThoeny - 13 Sep 2001
>
>
-- PeterThoeny - 21 Feb 2002
 -- MikeMannix - 14 Sep 2001
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TextFormattingFAQ.