Skip to content

Brewer scales does not seem accurate #316

@yohanboniface

Description

@yohanboniface

Hi!

When using this example from the documentation:

>> chroma.scale('OrRd').colors(5);
Array(5) [ "#fff7ec", "#fdd49e", "#fc8d59", "#d7301f", "#7f0000" ]

I would expect it to return the same colors as ColorBrewer would do:

image

But the results differ:

  • chroma-js: #fff7ec, #fdd49e, #fc8d59, #d7301f, #7f0000
  • ColorBrewer: #fef0d9, #fdcc8a, #fc8d59, #e34a33, #b30000

When I look at the chroma-js code handling this, it seems to me that indeed the brewer management is simplified. But I'm not sure at this point if this is a bug or a feature (to keep the code simple). And also I may be missing something.

So if this is considered as a bug, I can try to work on a proposal. If it's a feature, let's close! And if I'm misunderstandin something, sorry for the noise!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions