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

grey doesn't match the documentation #39

Open
samking opened this issue Nov 14, 2019 · 8 comments
Open

grey doesn't match the documentation #39

samking opened this issue Nov 14, 2019 · 8 comments

Comments

@samking
Copy link

samking commented Nov 14, 2019

When I try to use grey from this library, it outputs:

[
  '#a6a6a6',
  '#999999',
  '#8c8c8c',
  '#808080',
  '#737373',
  '#666666',
  '#404040',
  '#1a1a1a',
  '#000000',
  '#000000',
  primary: '#666666'
]

However, the spec / documentation (https://ant.design/docs/spec/colors) indicates that grey should be:

[                                                                             
'#ffffff',                                                                          
'#fafafa',                                                                          
'#f5f5f5',                                                                          
'#e8e8e8',                                                                          
'#d9d9d9',                                                                          
'#bfbfbf',                                                                          
'#8c8c8c',                                                                          
'#595959',                                                                          
'#262626',                                                                          
'#000000',                                                                          
]  

This issue is easy enough to workaround, but I thought a fix might help out a lot of folks. Thanks!

@carmanchris31
Copy link

carmanchris31 commented Jun 30, 2020

Note that the spec now has an expanded grey palette with 13 values:

#ffffff
#fafafa
#f5f5f5
#f0f0f0
#d9d9d9
#bfbfbf
#8c8c8c
#595959
#434343
#262626
#1f1f1f
#141414
#000000

https://ant.design/docs/spec/colors#Neutral-Color-Palette

This was discussed in the 4.0 announcement here: https://zhuanlan.zhihu.com/p/112470365

There's a lot of talk about how the dark colors have to be considered differently (versus simply flipping the order of the light colors), but it's only shown applied to the primary colors, so it's not clear what the presetDarkPalettes.grey export should look like.

@hustKiwi
Copy link

hustKiwi commented Sep 20, 2020

@afc163 @ycjcl868 Any thoughts on this issue? I would be keen to see the alignment with the official doc :)

@ZDerekh
Copy link

ZDerekh commented Dec 17, 2020

Is there any workaround on this issue? The greys colors are completely off.

@scottrotton
Copy link

Also having the issue

@bencerf
Copy link

bencerf commented Jun 18, 2021

Same, any updates ?

@shifraHolzer
Copy link

I, too, would like this to have a neater solution.

@destimon
Copy link

Seems like should be fixed in scope of #82. But for some reason it's ignored

@Morten-Moeller
Copy link

Morten-Moeller commented Nov 23, 2023

I wanted to use the Layout Background and found this solution:

const t = useTranslations();
const { useToken } = theme;
<div
style={{
          background: token.colorBgLayout,
        }} />

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

No branches or pull requests

9 participants