|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
const ThemeColorReplacer = require('webpack-theme-color-replacer') |
|
|
|
|
const varyColor = require('webpack-theme-color-replacer/client/varyColor') |
|
|
|
|
const client = require('webpack-theme-color-replacer/client') |
|
|
|
|
const generate = require('@ant-design/colors/lib/generate').default |
|
|
|
|
const themeColor = require('../config').themeColor |
|
|
|
@ -7,10 +7,10 @@ module.exports = { |
|
|
|
|
primaryColor: themeColor, |
|
|
|
|
getThemeColors(color) { |
|
|
|
|
const lightens = new Array(9).fill().map((t, i) => { |
|
|
|
|
return ThemeColorReplacer.varyColor.lighten(color, i / 10) |
|
|
|
|
return varyColor.lighten(color, i / 10) |
|
|
|
|
}) |
|
|
|
|
const palettes = generate(color) |
|
|
|
|
const rgb = ThemeColorReplacer.varyColor.toNum3(color.replace('#', '')).join(',') |
|
|
|
|
const rgb = varyColor.toNum3(color.replace('#', '')).join(',') |
|
|
|
|
return palettes.concat(lightens).concat(rgb) |
|
|
|
|
}, |
|
|
|
|
changeThemeColor (newColor) { |
|
|
|
|