From e3a077a0ec67575c67e2630552140423c4d1b4d4 Mon Sep 17 00:00:00 2001 From: huangzheng Date: Wed, 25 Sep 2019 15:32:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2`24,144,255`=E8=BF=99?= =?UTF-8?q?=E6=A0=B7=E7=9A=84=E4=B8=BB=E9=A2=98=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/plugin.config.ts | 3 ++- src/components/SettingDrawer/themeColorClient.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/plugin.config.ts b/config/plugin.config.ts index c00bfab5..92a61403 100644 --- a/config/plugin.config.ts +++ b/config/plugin.config.ts @@ -99,5 +99,6 @@ const getAntdSerials = (color: string) => { return ThemeColorReplacer.varyColor.lighten(color, i / devide10); }); const colorPalettes = generate(color); - return lightens.concat(colorPalettes); + const rgb = ThemeColorReplacer.varyColor.toNum3(color.replace('#', '')).join(','); + return lightens.concat(colorPalettes).concat(rgb); }; diff --git a/src/components/SettingDrawer/themeColorClient.ts b/src/components/SettingDrawer/themeColorClient.ts index d663e3bf..19bcb055 100644 --- a/src/components/SettingDrawer/themeColorClient.ts +++ b/src/components/SettingDrawer/themeColorClient.ts @@ -11,7 +11,8 @@ export default { let lightens = new Array(lightCount).fill(0); lightens = lightens.map((_, i) => client.varyColor.lighten(color, i / divide)); const colorPalettes = generate(color); - return lightens.concat(colorPalettes); + const rgb = client.varyColor.toNum3(color.replace('#', '')).join(','); + return lightens.concat(colorPalettes).concat(rgb); }, changeColor(color?: string): Promise { if (!color) {