Skip to content

Add support for accessible bearings colors

Choose a tag to compare

@kn6yuh kn6yuh released this 05 Mar 07:04
· 2 commits to main since this release

Instead of using fancy shades for each of the magnitude colors, we're scaling down to only 5 colors for all 1000 possible magnitude values.

Segments with the same color:

  • 000 -> 199
  • 200 -> 399
  • 400 -> 599
  • 600 -> 799
  • 800 -> 999

The accessible colors can be turned on by running the server with -accessible set, which will automatically used the following colors in order:

  • #2c7bb6 (lowest)
  • #abd9e9
  • #ffffbf
  • #fdae61
  • #d7191c (highest)

The default were picked https://colorbrewer2.org/#type=diverging&scheme=RdYlBu&n=5 looks like a very good place from where to pick the colors.

To override the values, you can use -colors to specify your own set of 5 hexadecimal color values in the following format:

% ./compass -accessible -colors="#2c7bb6,#abd9e9,#ffffbf,#fdae61,#d7191c"