ant-design / ant-design-colors

:art: Color Palettes Calculator of Ant Design
https://ant.design/docs/spec/colors
MIT License
652 stars 79 forks source link

grey doesn't match the documentation #39

Open samking opened 4 years ago

samking commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

ZDerekh commented 3 years ago

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

scottrotton commented 3 years ago

Also having the issue

bencerf commented 3 years ago

Same, any updates ?

shifraHolzer commented 3 years ago

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

destimon commented 1 year ago

Seems like should be fixed in scope of https://github.com/ant-design/ant-design-colors/pull/82. But for some reason it's ignored

Morten-Moeller commented 10 months ago

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

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