diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-01-01 14:55:23 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2021-01-01 21:10:10 +0100 |
commit | 7339dc28ae709f86e847ba5a6acb3e96f4ad0882 (patch) | |
tree | c2fc2c652cf09e43027437fe5b780702e3bf6456 /stats/legend.h | |
parent | 93ba2219ee06abe27573deeb4cfdf39f60d41087 (diff) | |
download | subsurface-7339dc28ae709f86e847ba5a6acb3e96f4ad0882.tar.gz |
statistics: add color-related functions
Add a source file and a header file, which implement the color
scheme used by the statistics module.
Besides a few color constants, the centerpiece is a
function that returns the color representing a bin and
an appropriate label color. It picks a roughly equi-distant
set of colors out of an already balanced set of 50 candidate
colors. And it also picks white as text color when adding a
label to a segment with a dark color.
The color list was created using a tool by Gregor Aisch that
is available on GitHub as https://github.com/gka/palettes to
create multi-hued, multi-stop color scales that are safe for
color blind people.
This commit contains code from three authors.
Dirk (main author): adaptive color scheme.
Willem: Colors of single-bin charts and lines.
Berthold: Infrastructure.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/legend.h')
0 files changed, 0 insertions, 0 deletions