givensuman / colorblind-theme

Color-blind friendly syntax highlighting for VSCode
https://colorblind-theme.netlify.app
Other
8 stars 0 forks source link
blind color theme vscode
logo

Colorblind Theme

![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/GivenSuman.colorblind-theme) Colorblind friendly syntax highlighting for VSCode

A dark theme created with accessibility in mind. Designed to provide meaningful syntax highlighting for all types of developers, with a special focus on being friendly to colorblind individuals.

The theme is directly based on the work of Paul Tol in data visualization accessibility.

code_screenshot

How It's Made

This theme is generated from the 23-color "discrete rainbow scheme" for colorblind accessibility described here. You can view the YAML of the color palette here. Token stylizing and editor appearance directly mirror the VSCode Dark+ theme built into the IDE. The YAML for that color palette is here, and the template JSON schema is here. A quick Python script replaces tokens in the schema with a best-match from Paul Tol's design.

Customizing

Individual colors for the theme can be changed in either palette.yaml for language tokens, or base_palette.yaml for editor/workbench colors.

The main.py can be used to quickly generate a theme with an alternative base to VSCode's Dark+ theme. To do so, install a desired theme in VSCode, and use ctrl+shift+p to open the command palette. Search/select "Developer: Generate Color Scheme From Current Settings", and replace base_template.json with the resulting file.

You may need to modify the Python code as necessary! Note that the template defines how colors are applied, but you will need to manually pull out preferred color codes.