Allow for different shades of colors
See original GitHub issueHey all, love the library. Super simple and intuitive to get started with.
I’d love to have the option to select a specific shade of a color from the Tailwind palette (e.g. blue-700
), which would be useful for cases like a chart using multiple shades of a color:
Something like this:
<BarChart
data={...}
categories={['First', 'Second', 'Third', 'Fourth']}
dataKey="month"
colors={['blue-700', 'blue-600', 'blue-500', 'blue-400']}
stack={true}
/>
Is this something you’d consider adding?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
+12 Shades of Color with Hex Codes - Eggradients.com
From light blue to dark red, you can find 50 shades of 11 colors on this page. Different shades of similar colors are...
Read more >Colors in English: 90 Dreamy Shades from Mint Green to Mango
From shades of green to hues of yellow, this dazzling and delicious color palette guide for learning English colors is a must.
Read more >Color Theory 101: A Complete Guide to Color Wheels & Color ...
Consider this your introductory course to color theory, types of color ... The various "shades" just refer to how much black you're adding....
Read more >Different shades of perception
Color categories make the world easier to live in. Granny Smith (green) and Red Delicious (red) apples belong in different bins; so do...
Read more >Improve Your Vocabulary: 50+ Shades of Colors in English!
You already know your basic colors in English, now let's take them to the next l ... They're different shades of red, but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Awesome, thanks! And yes I definitely understand the desire to keep things opinionated, and that even in this seemingly simple case there are plenty of things to consider when approaching the implementation (for one, the best way to allow for each shade without oversaturating the TypeScript suggestions with all of
blue-100
,blue-200
, etc, or if this is even a problem at all).For my use case, we’re using the Tailwind color palette for our branding, but are primarily using
blue-700
as our brand color, with someorange-600
accents in small places. Using other Tailwind colors in our charts isn’t awful, but it definitely clashes with the rest of the UI a bit.I do wonder if an “escape hatch” for arbitrary color customization might be the best way to provide this type of flexibility (since I imagine that’ll be a common request in the future), while still highly recommending the default Tailwind color palette, to take advantage of things like the automatic shade adjustment that you mention in your color palette docs. Just a thought, obviously there’s always a trade-off!
Of course! Happy to help in any way I can