How to use the webpack-theme-color-replacer.varyColor function in webpack-theme-color-replacer

To help you get started, we’ve selected a few webpack-theme-color-replacer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Jkanon / webmagician-ui / config / plugin.config.ts View on Github external
const getAntdSerials = (color: string) => {
  const lightNum = 9;
  const devide10 = 10;
  // 淡化(即less的tint)
  const lightens = new Array(lightNum).fill(undefined).map((_, i: number) => {
    return ThemeColorReplacer.varyColor.lighten(color, i / devide10);
  });
  const colorPalettes = generate(color);
  const rgb = ThemeColorReplacer.varyColor.toNum3(color.replace('#', '')).join(',');
  return lightens.concat(colorPalettes).concat(rgb);
};
github FE-Kits / m-fe-rtw / packages / rtw-host-app / scripts / webpack / webpack.config.theme.js View on Github external
var lightens = new Array(9).fill().map((t, i) => {
    return ThemeColorReplacer.varyColor.lighten(color, i / 10);
  });
  // 此处为了简化,采用了darken。实际按color.less需求可以引入tinycolor, colorPalette变换得到颜色值
github tangtanglove / fullstack-frontend / config / plugin.config.ts View on Github external
const lightens = new Array(lightNum).fill(undefined).map((_, i: number) => {
    return ThemeColorReplacer.varyColor.lighten(color, i / devide10);
  });
  const colorPalettes = generate(color);
github crawlab-team / artipub / config / plugin.config.ts View on Github external
const lightens = new Array(lightNum).fill(undefined).map((_, i: number) => {
    return ThemeColorReplacer.varyColor.lighten(color, i / devide10);
  });
  const colorPalettes = generate(color);
github Jkanon / webmagician-ui / config / plugin.config.ts View on Github external
const lightens = new Array(lightNum).fill(undefined).map((_, i: number) => {
    return ThemeColorReplacer.varyColor.lighten(color, i / devide10);
  });
  const colorPalettes = generate(color);
github FE-Kits / m-fe-rtw / packages / rtw-host-app / scripts / webpack / webpack.config.theme.js View on Github external
var darkens = new Array(6).fill().map((t, i) => {
    return ThemeColorReplacer.varyColor.darken(color, i / 10);
  });
  return lightens.concat(darkens);
github tangtanglove / fullstack-backend / resources / frontend / config / plugin.config.ts View on Github external
const lightens = new Array(lightNum).fill().map((t, i) => {
    return ThemeColorReplacer.varyColor.lighten(color, i / devide10);
  });
  const colorPalettes = generate(color);

webpack-theme-color-replacer

A webpack plugin designed to dynamicly change the theme colors at runtime. 实现运行时快速动态替换主题色的webpack插件.

MIT
Latest version published 2 months ago

Package Health Score

66 / 100
Full package analysis