Skip to content

Improve syntax highlighting color constrast #1359

@kaylee42

Description

@kaylee42

Inspired loosely by the idea behind colorblind-wombat-dark-syntax, improve the color contrast of syntax highlighting so that it is more accessible to students with various forms of colorblindness. As noted in the above linked article, most syntax highlighters need more 7 colors, so this will likely not be perfect, but at a minimum we can improve the contrast for syntax highlighting.

More research is probably needed to figure out good colors for the white background popcode uses, but here's a starting point on color palettes for colorblindness. Specifically, the 12 color palette looks very promising:

Concrete proposal is to roll our own ACE theme based on the 12 color palette, avoiding the lighter/lower-contrast tones (so we’d probably have about eight to work with). Looking at the built-in ACE themes, most appear to only be about 100 lines of CSS, so this seems pretty practical. And building our own from scratch removes a lot of the unpredictability associated with trying to adapt an existing theme.

Of course from an implementation standpoint we should be able to just write appropriately-scoped rules right into our own stylesheet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions