mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 11:32:52 +08:00
docs: fix wrong brightness value in Palette Generation Tool (#48973)
This commit is contained in:
parent
51ec7e39a3
commit
253b45eceb
@ -11,14 +11,14 @@ const primaryMinBrightness = 70; // 主色推荐最小亮度
|
||||
|
||||
const locales = {
|
||||
cn: {
|
||||
saturation: (s: string) => `饱和度建议不低于${primaryMinSaturation}(现在${s})`,
|
||||
brightness: (b: string) => `亮度建议不低于${primaryMinBrightness}(现在${b})`,
|
||||
saturation: (s: string) => `饱和度建议不低于${primaryMinSaturation}(当前值 ${s})`,
|
||||
brightness: (b: string) => `亮度建议不低于${primaryMinBrightness}(当前值 ${b})`,
|
||||
},
|
||||
en: {
|
||||
saturation: (s: string) =>
|
||||
`Saturation is recommended not to be lower than ${primaryMinSaturation}(currently${s})`,
|
||||
`Saturation is recommended not to be lower than ${primaryMinSaturation} (currently ${s})`,
|
||||
brightness: (b: string) =>
|
||||
`Brightness is recommended not to be lower than ${primaryMinBrightness}(currently${b})`,
|
||||
`Brightness is recommended not to be lower than ${primaryMinBrightness} (currently ${b})`,
|
||||
},
|
||||
};
|
||||
|
||||
@ -41,7 +41,7 @@ const ColorPaletteTool: React.FC = () => {
|
||||
text += locale.saturation((s * 100).toFixed(2));
|
||||
}
|
||||
if (b * 100 < primaryMinBrightness) {
|
||||
text += locale.brightness((s * 100).toFixed(2));
|
||||
text += locale.brightness((b * 100).toFixed(2));
|
||||
}
|
||||
}
|
||||
return <span className="color-palette-picker-validation">{text.trim()}</span>;
|
||||
|
Loading…
Reference in New Issue
Block a user