Dreamweaver Colours for GeSHi

GeSHi Preview

Some of you may have seen the fancy code highlighting in my other code tutorials, this effect is achieved by using the GeSHi highlighting class.

The GeSHi library contains definitions for many script languages, a full list can be seen on their website. The default colour definitions are however not great, so I have set about customising a few of the language definitions to highlight your code as Adobe Dreamweaver CS3 would do so.

The languages I have done are; PHP, HTML and CSS. These are compatible with GeSHi 1.0.8.3. Simply download the zip file below and replace the existing language definition files with the files in the zip.

You can download these files here:
geshi-dreamweaver-colours.zip (15.6 KB)

Note: Due to the lightweight nature of the CSS language, it was pretty much impossible to get perfect, so there are a couple of things to take note of:

1. When using a line with commas in the string, like:
font-family: Arial, Helvetica, sans-serif;
Make sure you add a space after the : otherwise it will assume the string is a pseudo class.

2. When specifying a HEX colour color:#F0F0F0;
Make sure you use the full six characters, no shorthand abbreviations, also ensure all alphabetical characters are uppercase.

3. When using url()
Make sure you wrap the URL string in quote marks like so:
url("images/image.jpg")

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>