Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Incubator escapee wiki:WikiProject C/C++/Syntax highlighting
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Standard colors== While the usual white or off-white background is reasonably well suited for plain encyclopedic text, it's poor at providing the contrast needed to easily distinguish color. Thus, colored text should preferably be placed on a dark background to allow a broad range of colors to be used. Note, however, that pure blue is less visible against black than against white. The default colors are proposed to be as follows (it will of course be possible to override them with style sheets): {| border="1" cellspacing="0" cellpadding="3" style="color: #cccccc" |- ! style="font-family: serif" | Color ! style="font-family: serif" | [[RGB]] triplet ! style="font-family: serif" | Uses |- | style="color: #ffffff" | White | style="color: #ffffff" | #ffffff | style="font-family: serif" | [[keyword]]s |- | style="color: #ff0000" | Red | style="color: #ff0000" | #ff0000 | style="font-family: serif" | [[decimal]] [[number]]s |- | style="color: #ff8000" | Orange | style="color: #ff8000" | #ff8000 | style="font-family: serif" | [[octal]] numbers |- | style="color: #ffff00" | Yellow | style="color: #ffff00" | #ffff00 | style="font-family: serif" | [[character (computer science)|character]]s, [[character string (computer science)|strings]] |- | style="color: #00ff00" | Green | style="color: #00ff00" | #00ff00 | style="font-family: serif" | [[preprocessor]] symbols |- | style="color: #00ffff" | Cyan | style="color: #00ffff" | #00ffff | style="font-family: serif" | [[function (computer science)|function]] names |- | style="color: #0000ff" | Blue | style="color: #0000ff" | #0000ff | style="font-family: serif" | ? |- | style="color: #ff00ff" | Magenta | style="color: #ff00ff" | #ff00ff | style="font-family: serif" | [[hexadecimal]] numbers |- | style="color: #a00000" | Dark red | style="color: #a00000" | #a00000 | style="font-family: serif" | ? |- | style="color: #a05000" | Dark orange | style="color: #a05000" | #a05000 | style="font-family: serif" | ? |- | style="color: #a0a000" | Dark yellow | style="color: #a0a000" | #a0a000 | style="font-family: serif" | comments |- | style="color: #00a000" | Dark green | style="color: #00a000" | #00a000 | style="font-family: serif" | ? |- | style="color: #00a0a0" | Dark cyan | style="color: #00a0a0" | #00a0a0 | style="font-family: serif" | [[punctuation]] |- | style="color: #0000a0" | Dark blue | style="color: #0000a0" | #0000a0 | style="font-family: serif" | ? |- | style="color: #a000a0" | Dark magenta | style="color: #a000a0" | #a000a0 | style="font-family: serif" | ? |- | style="color: #cccccc" | Gray | style="color: #cccccc" | #cccccc | style="font-family: serif" | everything else |- | style="color: #a0a0a0" | Dark gray | style="color: #a0a0a0" | #a0a0a0 | style="font-family: serif" | ? |- |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)