mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-12 20:43:11 +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 = {
|
const locales = {
|
||||||
cn: {
|
cn: {
|
||||||
saturation: (s: string) => `饱和度建议不低于${primaryMinSaturation}(现在${s})`,
|
saturation: (s: string) => `饱和度建议不低于${primaryMinSaturation}(当前值 ${s})`,
|
||||||
brightness: (b: string) => `亮度建议不低于${primaryMinBrightness}(现在${b})`,
|
brightness: (b: string) => `亮度建议不低于${primaryMinBrightness}(当前值 ${b})`,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
saturation: (s: string) =>
|
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: (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));
|
text += locale.saturation((s * 100).toFixed(2));
|
||||||
}
|
}
|
||||||
if (b * 100 < primaryMinBrightness) {
|
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>;
|
return <span className="color-palette-picker-validation">{text.trim()}</span>;
|
||||||
|
Loading…
Reference in New Issue
Block a user