chroma Command Examples

A general-purpose syntax highlighter. The --lexer option is usually unnecessary, as it will be automatically determined based on the file extension. More information: https://github.com/alecthomas/chroma.

chroma --lexer {{python}} {{path/to/source_file.py}}

chroma --lexer {{go}} --formatter {{html}} {{path/to/source_file.go}} > {{path/to/target_file.html}}

{{command}} | chroma --lexer {{c++}} --formatter {{svg}} --style {{monokai}} > {{path/to/target_file.svg}}

chroma --list