Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better default colors for plots #46

Closed
FedericoStra opened this issue Jan 19, 2022 · 0 comments · Fixed by #47
Closed

Better default colors for plots #46

FedericoStra opened this issue Jan 19, 2022 · 0 comments · Fixed by #47

Comments

@FedericoStra
Copy link
Contributor

I accidentally opened this issue bheisler/criterion.rs#547 on criterion.rs instead of here. #11 is also another similar issue.

The problem seems to be that https://github.com/bheisler/cargo-criterion/blob/main/src/config.rs#L25-L34 defines the colors as

static COMPARISON_COLORS: [Color; NUM_COLORS] = [
    Color { r: 8, g: 34, b: 34 },
    Color { r: 6, g: 139, b: 87 },
    Color { r: 0, g: 139, b: 139 },
    Color { r: 5, g: 215, b: 0 },
    Color { r: 0, g: 0, b: 139 },
    Color { r: 0, g: 20, b: 60 },
    Color { r: 9, g: 0, b: 139 },
    Color { r: 0, g: 255, b: 127 },
];

instead of https://github.com/bheisler/criterion.rs/blob/master/src/plot/plotters_backend/summary.rs#L12-L21

static COMPARISON_COLORS: [RGBColor; NUM_COLORS] = [
    RGBColor(178, 34, 34),
    RGBColor(46, 139, 87),
    RGBColor(0, 139, 139),
    RGBColor(255, 215, 0),
    RGBColor(0, 0, 139),
    RGBColor(220, 20, 60),
    RGBColor(139, 0, 139),
    RGBColor(0, 255, 127),
];

Probably in the copy-paste the red channel got somehow reduced modulo 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant