Night Owl Pygments

An early, partially tested adaptation of Sarah Drasner's Night Owl Visual Studio Code theme to pygments.

Due to differences between lexers, it seems impossible to exactly replicate the style achieved in the VS Code theme.

Rationale

Hugo, the static site generator uses a Pygments compatible code formatter, which supports using compatible CSS stylesheets for syntax highlighting colours. Using to_css.py in this repository will generate one of these stylesheets based on the current implementation of the theme. Prebuilt CSS releases are also available as releases, for tagged versions.

Development

Run test.py to generate test.html based on the output of highlighting all of the defined samples. Compare against vscode.html for how it is rendered with the official theme.

Contributing

  1. Add a sample case to the samples folder.
  2. Add the sample case (copied from the appropriately highlighted file in VS Code, using the Copy With Syntax Highlighting command pallette option) to the vscode.html file (Note that samples are alphabetically sorted by sample filename).
  3. Modify the samples array in test.py to add the sample with the correct lexer.
  4. Open a PR once style.py is to your liking (being careful to check for regressions for other samples).

Particularly welcome ideas

  • A cleaner test/comparison experience.
  • More comparison cases.
  • Ideal packaging for the style for use with Pygments.