Skip to content

Use CVD friendly defaults for boundary and cell region maps #38

Open

Description

@jpthiele

I'd advocate to change the color maps to something that is color-vision-deficiency like Brewer or scientific color maps.
Both would be available in ColorSchemes.jl, so it should be an easy switch.
Currently, the first two colors for the boundary region are red and green,
which is the worst possible choice given CVD statistics.

For a detailed reference, see https://www.nature.com/articles/s41467-020-19160-7

Activity

  1. j-fu commented on Aug 14, 2026

    @j-fu
    Member

    I very much agree in principle. However I in this case I am reluctant to switch to one of the finite size categorical colormaps here as we cannot know how many different colors we need.

    Here we need an algorithm which
    a) reliably works for an arbitrary number of categories (integers)
    b) has a maximum of perceptual distance between colors corresponding to neighboring numbers
    c) b) conforming to CVD rules.

    May be someone already invented this bicycle. Or Claude can invent it...

  2. jpthiele commented on Aug 14, 2026

    @jpthiele
    ContributorAuthor

    The brewer color scales where designed for cartography, so I think they should be a good choice.
    Looking at what is available for a maximum of 11 different data points and is CVD friendly there are a few options,
    see https://colorbrewer2.org/#type=diverging&scheme=BrBG&n=11
    I think BrBG, PRGn, PuOr would all work for the cell regions
    And maybe one of the sequential schemes (with a max of 9) would work best for the boundary, e.g. YlGnBu or YlGn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions