FAQ:
Can I write colored text?
Answer:
TWikiPreferences defines some commonly used colors:
%YELLOW%, %RED%, %PINK%, %PURPLE%, %TEAL%, %NAVY%, %BLUE%, %AQUA%, %LIME%, %GREEN%, %OLIVE%, %MAROON%, %BLACK%, %GRAY%, %SILVER% and
%ENDCOLOR%.
- You enter:
%RED% red text %ENDCOLOR% and %GREEN% green text %ENDCOLOR%
Result: red text and green text
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%
.
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
.
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.
Back to: NatsWikiFAQ
--
MichaelDaum --
29 Aug 2003