Pygments is a generic syntax highlighter suitable for use in code hosting, forums, wikis or other applications that need to prettify source code.
Py of course stands for Python, while pigments are used for coloring paint, and in this case, source code.
This is free and open source software.
Key Features
- Supports over 500 languages and text formats.
- Fast parsing and formatting.
- Special attention is paid to details that increase highlighting quality.
- Support for new languages and formats are added easily; most languages use a simple regex-based lexing mechanism.
- A number of output formats are available, among them HTML, RTF, LaTeX and ANSI sequences.
- Usable as a command-line tool and as a library.
Website: pygments.org
Support: GitHub Code Repository
Developer: Georg Brandl
License: BSD 2-Clause “Simplified” License
Pygments is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Syntax Highlighters | |
|---|---|
| Prism | Lightweight, extensible syntax highlighter, with modern web standards in mind |
| Highlight.js | JavaScript syntax highlighter with language auto-detection |
| Shiki | Themeable code rendering powered by TextMate grammars |
| Chroma | General purpose syntax highlighter |
| Rouge | Pure Ruby syntax highlighter |
| Pygments | Generic syntax highlighter |
| starry-night | GitHub-style code colouring for JavaScript projects |
| Highlight | Transforms source code into polished, readable output |
| Re-Highlight | Powerful syntax highlighter |
Read our verdict in the software roundup.
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.