wp-syntax is a nice plugin for WordPress using GeSHi to produce syntax highlighted blocks of code.
The default colours aren’t very nice though, and there is no way to easily change them. wp-syntax-colorizer (horrible name) makes it easier to set the colours, but defaults to even worse colours.
Most of us want readable colours that we are used to from IDEs, and most of us will be using either Visual Studio or Eclipse. I mainly use the former. To get it to use the visual studio colours I edit wp-syntax-colorizer as follows:
function my_custom_geshi_styles(&$geshi) { $overall = "black"; $keyword = "blue"; $literal = "maroon"; $comment = "green"; $geshi->set_overall_style("color: $overall;", true); $geshi->set_keyword_group_style(1, "color: $keyword;", true); $geshi->set_keyword_group_style(2, "color: $keyword;", true); $geshi->set_keyword_group_style(3, "color: $keyword;", true); $geshi->set_keyword_group_style(4, "color: $keyword;", true); $geshi->set_symbols_style("color: $overall;", true); $geshi->set_methods_style(1, "color: $overall;", true); $geshi->set_regexps_style(1, "color: $overall;", true); $geshi->set_strings_style("color: $literal;", true); $geshi->set_numbers_style("color: $literal;", true); $geshi->set_comments_style(1, "color: $comment;", true); $geshi->set_comments_style('MULTI',"color: $comment;", true); }