Useful libraries for coloring programming language syntax.

Lowlight and Refractor are two interesting libraries that wrap highlight.js and Prism respectively.

From Titus Wormer:

Virtual syntax highlighting for virtual DOMs and non-HTML things.

Instead of returning a HTML string with <span>s and class names, it returns an array of objects that you can use to create HTML or anything else really. Super useful for creating React components without using something like dangerouslySetInnerHTML.