accessiblecode

accessiblecode

A working example of using acceptable contrast ratios in code snippets for use in Jekyll.

Accessible Code

A working example of using acceptable contrast ratios in code snippets for use in Jekyll. Every web platform has a slightly different way of detecting and styling code. This is not a universal solution, but hopefully an encouragement for you to check to see if your code coloring theme uses a contrast ratio that meets modern accessibility standards.

Resources

For more information on the types of needs associated with visual accessibility, you learn more about colorblindness here. Or you can test your color palate here to see if it meets the standards.

How It Works

I built my code coloring theme on top of a Jekyll template, so simply copying and pasting these colors won't fix it (unless you're building a Jekyll site on top of the Minima theme). But you can take a look at what I did in order to make decisions about what might work for you.

Examples:

For a live list of some examples, you can visit my site to see it integrated into the template.