Wiki Style Colors
(:Summary: PmWiki group header. Includes styles and trail.:)
(:Summary: Standard and additional wiki colour styles:)
Colour Examples
Some color definitions above and beyond what's standard in PmWiki:
%define=hardblue color=#0000cc% hard blue %define=darkgreen color=#006600% dark green %define=bluegrass color=#009999% blue grass %define=teal color=#33ffcc% teal %define=darkpurple color=#660066% dark purple %define=perwinkle color=#6600cc% periwinkle %define=darkgrey color=#666666% dark grey %define=mistgreen color=#669966% mist green %define=slategreen color=#669999% slate green %define=lightpurple color=#9966cc% light purple %define=lightgrey color=#999999% light grey %define=lightblue color=#99ccff% light blue %define=springgreen color=#99ff33% spring green %define=magenta color=#cc33cc% magenta %define=burnttorange color=#cc6633% burnt orange %define=grey color=#cccccc% grey %define=lightgreen color=#ccffcc% light green %define=pink color=#ff3399% pink %define=lightred color=#ff6666% light red %define=orange color=#ff9900% orange %define=lightorange color=#ff9966% light orange %define=gold color=#ffbb66% gold |
hard blue dark green blue grass teal dark purple periwinkle dark grey mist green slate green light purple light grey light blue spring green magenta burnt orange grey light green pink light red orange light orange gold |
Standard PmWiki colours
black | black |
blue | blue |
gray | gray |
green | green |
maroon | maroon |
navy | navy |
purple | purple |
red | red |
silver | silver |
white | white |
yellow | yellow |
Hints and Tips:
- You need not "define" the hexadecimal colors in order to use them; it works just as well to set %color=#cc33cc% before some text as to "define" it and use the definition. The definition is convenient if you're going to use the color more than once.
- Use lowercase characters - prevents color numbers being mis-read as Wiki text.
- Remember that the same color may appear differently depending on the device (CRT screen, TFT display, printer, ...) and the gamma curve used. Notably, the same color may look too light or dark when seen on Windows (gamma is usually set to 2.5) and Mac computers (gamma 1.8).
- Text color always looks brighter than background color, because the white background dominates the overall brightness. IOW text colors should be darker than background colors to achieve the same impression of brightness (unless, of course, your wiki has a reverse video color scheme).
- Too many colours on the same page is distracting. Use them sparingly.
- You can hide text by making it white-on-white. It's a poor obfuscation technique though: the HTML source code will give it away, and if a savvy visitor marks the text, he'll see it anyway. Still, some single-author sites use it for making the Edit link unobtrusive.
More Colours Options (external links open in new windows)
- 4096 Color Wheel at Mandarin Design
- Websafe Color Chart at Mandarin Design
- http://w3schools.com/html/html_colors.asp
- Pixie download site - install and run this tiny Windows utility, and "simply point to a colour and it will tell you the hex, RGB, HTML, CMYK and HSV values of that colour." (on Macintosh just open TextEdit and use shift+command+c)
Comments
How do admins define colors for all pages?? Define color keywords and rely on the browser to render the color values. you can use the color keywords for both text color (use %keyword%text%%) and also background color (use %bgcolor=keyword%text%%). Add to your local configuration file:
$SVGColors = array ( 'aliceblue','antiquewhite','aqua','aquamarine','azure','beige','bisque','black', 'blanchedalmond','blue','blueviolet','brown','burlywood','cadetblue','chartreuse','chocolate', 'coral','cornflowerblue','cornsilk','crimson','cyan','darkblue','darkcyan','darkgoldenrod', 'darkgrey','darkgreen','darkkhaki','darkmagenta','darkolivegreen','darkorange','darkorchid','darkred', 'darksalmon','darkseagreen','darkslateblue','darkslategray', 'darkturquoise','darkviolet','deeppink','deepskyblue', 'dimgray','dodgerblue','firebrick','floralwhite','forestgreen','fuchsia','gainsboro','ghostwhite', 'gold','goldenrod','gray','green','greenyellow','honeydew','hotpink','indianred', 'indigo','ivory','khaki','lavender','lavenderblush','lawngreen','lemonchiffon','lightblue', 'lightcoral','lightcyan','lightgoldenrodyellow','lightgreen', 'lightgrey','lightpink','lightsalmon','lightseagreen', 'lightskyblue','lightslategray','lightsteelblue','lightyellow','lime','limegreen','linen','magenta', 'maroon','mediumaquamarine','mediumblue','mediumorchid', 'mediumpurple','mediumseagreen','mediumslateblue','mediumspringgreen', 'mediumturquoise','mediumvioletred','midnightblue','mintcream', 'mistyrose','moccasin','navajowhite','navy', 'oldlace','olive','olivedrab','orange','orangered','orchid','palegoldenrod','palegreen', 'paleturquoise','palevioletred','papayawhip','peachbuff','peru','pink','plum','powderblue', 'purple','red','rosybrown','royalblue','saddlebrown','salmon','sandybrown','seagreen', 'seashell','sienna','silver','skyblue','slateblue','slategray','snow','springgreen', 'steelblue','tan','teal','thistle','tomato','turquoise','violet','wheat', 'white','whitesmoke','yellow','yellowgreen' ); foreach($SVGColors as $c) $WikiStyle[$c]['color'] = $c;
Alternatively define the required colors in the local configuration file. (See Custom WikiStyles for details). For example add the following line(s) to local/config.php
:
$WikiStyle['hardblue']['color']='#0000cc'; $WikiStyle['darkgreen']['color']='#006600'; $WikiStyle['bluegrass']['color']='#009999'; $WikiStyle['teal']['color']='#33ffcc'; $WikiStyle['darkpurple']['color']='#660066'; $WikiStyle['perwinkle']['color']='#6600cc'; $WikiStyle['darkgrey']['color']='#666666'; $WikiStyle['mistgreen']['color']='#669966'; $WikiStyle['slategreen']['color']='#669999'; $WikiStyle['purple']['color']='#990099'; $WikiStyle['lightpurple']['color']='#9966cc'; $WikiStyle['lightgrey']['color']='#999999'; $WikiStyle['lightblue']['color']='#99ccff'; $WikiStyle['springgreen']['color']='#99ff33'; $WikiStyle['magenta']['color']='#cc33cc'; $WikiStyle['burnttorange']['color']='#cc6633'; $WikiStyle['grey']['color']='#cccccc'; $WikiStyle['lightgreen']['color']='#ccffcc'; $WikiStyle['pink']['color']='#ff3399'; $WikiStyle['lightred']['color']='#ff6666'; $WikiStyle['orange']['color']='#ff9900'; $WikiStyle['lightorange']['color']='#ff9966'; $WikiStyle['gold']['color']='#ffbb66'; $WikiStyle['yellow']['color']='#ffff00';