'Antd ConfigProvider not generating same colors as provided on color palettes

I'm working with antd at the moment while trying to use the color palette they provided (https://ant.design/docs/spec/colors) along with the ConfigProvider Dynamic Theme (https://ant.design/docs/react/customize-theme-variable).

I'm trying to use the Neutral Color Palette as my primary color, but I don't get the same colors as shown in the examples.

My code looks like this :

ConfigProvider.config({
  theme: {
    primaryColor: "#bfbfbf" // gray-6
  }
});

I'm ok with getting only 10 colors instead of 13, but why are they different from the colors initially shown in the palette ? Even the 10 colors I get (generated) from the ConfigProvider aren't the same as the 10 first colors shown in the Neutral Color Palette.

I have tried changing the primaryColor to use gray-5 or gray-7 instead of gray-6, but this doesn't generate me the same colors shown in the Neutral Color Palette.

Is it possible to generate the original colors from the Neutral Color Palette by using the ConfigProvider Dynamic Theme ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source