Chroma
Syntax highlighter library in pure Go that converts source code and other structured text into highlighted HTML or ANSI-colored text.
Chroma is a syntax highlighter library written in Go. It takes source code and other structured text and turns it into highlighted HTML or ANSI-colored text. The project says it is based heavily on Pygments and includes translators for Pygments lexers and styles.
A Go program imports the module and selects a lexer, a style and a formatter from the registries the packages hold. The README also describes a command-line interface, installed from release binaries, that can act as a preprocessor for less.
Identity
- Status
- Active
- Maintainer
- Alec Thomas4
- Maintained by
- Individual
- First release
- 20173
Rendering and deploy
- Install with
- go import2
Releases
Adoption
Sources
- 2026-11-04: links
github.com/alecthomas/chroma - 2026-11-04: links, Categories, Runtime, Install with
github.com/alecthomas/chroma/blob/v2.27.0/README.md - 2026-11-04: First release
api.github.com/repos/alecthomas/chroma/commits/2181aa5f70c436919554159e73f7683d43cf5761 - 2026-11-04: Maintainer, License
github.com/alecthomas/chroma/blob/v2.27.0/COPYING - 2026-11-04: Written in, GitHub stars
api.github.com/repos/alecthomas/chroma - 2026-11-04: Current major version, Last release
github.com/alecthomas/chroma/releases/tag/v2.27.0 - 2026-11-04: Contributors
api.github.com/repos/alecthomas/chroma/contributors