# Rouge

> A pure Ruby code highlighter that is compatible with Pygments

Source: https://talira.ai/catalog/rouge-ag1bcpgj
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [developer tools / syntax highlighting](https://talira.ai/categories/developer-tools/syntax-highlighting), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Licence: MIT AND BSD-2-Clause[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- API: yes[^3]
- Plugins: yes[^3]
- Creator: Jeanine Adkisson (jneen)

Rouge is a pure Ruby syntax highlighter with lexers for over 200 languages, many adapted from Pygments. It outputs HTML (with standard class names, inline styles for email, line numbers, highlighted lines or table layouts), ANSI 256-colour or truecolor terminal text and TeX, and its HTML works with stylesheets made for Pygments. It's Jekyll's default highlighter, renders themes such as Monokai and Base16 as CSS, and comes with a `rougify` command. Jeanine Adkisson created it in 2012; a team of volunteers maintains it, and its development has moved to Codeberg.

## Links

- Website: https://rouge.jneen.ca/
- GitHub: https://github.com/rouge-ruby/rouge
- Docs: https://rouge-ruby.github.io/docs/

## Problems it solves

- highlight code snippets on my Ruby-generated blog or docs site
- colour source code in HTML using the Pygments stylesheets I already have
- syntax highlighting without installing Python on our Ruby servers
- show highlighted code in emails where external CSS doesn't work
- print syntax-highlighted source files in the terminal
- add line numbers and highlight specific lines in a code sample
- generate a CSS theme like Monokai for highlighted code blocks
- highlight code in a language the highlighter doesn't know yet by writing my own lexer
- guess the language of a code snippet that came without a label
- highlighted code listings in a LaTeX document from Ruby

## Features

- lexers for over 200 languages
- HTML, inline-styled HTML, line table, linewise and line highlighter formatters
- Pygments-compatible HTML output and wrapper
- ANSI 256-colour and truecolor terminal output
- TeX formatter
- built-in themes rendered as CSS, such as Base16 and Monokai
- rougify command to highlight files and print theme CSS
- language guessing
- plugins for extra lexers, and custom formatters
- no external dependencies; Ruby 3.0 and later

## Capabilities

- Has an API: plan not known
- Has a command line tool: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.60 out of 1.
Signals: maintenance 0.64, adoption 0.71, momentum 0.40, community 1.00, backing 0.20, extensibility 0.60.

- last commit 26 days ago
- 6 commits in the last 90 days
- latest release v5.1.0 3 months ago
- 3.5k GitHub stars
- 479 contributors
- created by Jeanine Adkisson (jneen)
- has a plugin system

## Sources

[^1]: https://codeberg.org/rouge-ruby/rouge/src/branch/main/LICENSE (checked 20 Nov 2026)
[^2]: https://rubygems.org/gems/rouge (checked 20 Nov 2026)
[^3]: https://codeberg.org/rouge-ruby/rouge (checked 20 Nov 2026)
