ant-design-colors
ant-design-colors copied to clipboard
grey doesn't match the documentation
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!
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.
@afc163 @ycjcl868 Any thoughts on this issue? I would be keen to see the alignment with the official doc :)
Is there any workaround on this issue? The greys colors are completely off.
Also having the issue
Same, any updates ?
I, too, would like this to have a neater solution.
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
I wanted to use the Layout Background and found this solution:
const t = useTranslations();
const { useToken } = theme;
<div
style={{
background: token.colorBgLayout,
}} />