Skip to content

How to know what colors are used in a particular chart? #2614

Answered by plouc
scio-cypher asked this question in Q&A
Discussion options

You must be logged in to vote

By default it uses the nivo scheme, and it's a categorical color scheme, meaning it'll assign colors to each slice in order of appearance, maybe it's clearer with this screenshot:

You can access the scheme colors like this:

import { categoricalColorSchemes } from '@nivo/colors'
categoricalColorSchemes.nivo

Regarding the bar chart, it's almost the same logic, but then it also depends on grouping.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@scio-cypher
Comment options

Answer selected by scio-cypher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants