How to use @ant-design/colors - 10 common examples

To help you get started, we’ve selected a few @ant-design/colors 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 tangtanglove / fullstack-frontend / 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);
  return lightens.concat(colorPalettes);
};
github tangtanglove / fullstack-frontend / src / components / SettingDrawer / themeColorClient.ts View on Github external
getAntdSerials(color: string): string[] {
    const lightCount = 9;
    const divide = 10;
    // 淡化(即less的tint)
    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);
  },
  changeColor(color?: string): Promise {
github Jkanon / webmagician-ui / src / components / SettingDrawer / themeColorClient.ts View on Github external
getAntdSerials(color: string): string[] {
    const lightCount = 9;
    const divide = 10;
    // 淡化(即less的tint)
    let lightens = new Array(lightCount).fill(0);
    lightens = lightens.map((_, i) => client.varyColor.lighten(color, i / divide));
    const colorPalettes = generate(color);
    const rgb = client.varyColor.toNum3(color.replace('#', '')).join(',');
    return lightens.concat(colorPalettes).concat(rgb);
  },
  changeColor(color?: string): Promise {
github apache / submarine / submarine-workbench / workbench-web / src / components / SettingDrawer / themeColor.js View on Github external
getAntdSerials (color) {
    // 淡化(即less的tint)
    const lightens = new Array(9).fill().map((t, i) => {
      return client.varyColor.lighten(color, i / 10)
    })
    // colorPalette变换得到颜色值
    const colorPalettes = generate(color)
    return lightens.concat(colorPalettes)
  },
  changeColor (newColor) {
github crawlab-team / artipub / 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);
  return lightens.concat(colorPalettes);
};
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 crawlab-team / artipub / src / components / SettingDrawer / themeColorClient.ts View on Github external
getAntdSerials(color: string): string[] {
    const lightCount = 9;
    const divide = 10;
    // 淡化(即less的tint)
    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);
  },
  changeColor(color?: string): Promise {
github tangtanglove / fullstack-backend / resources / frontend / 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().map((t, i) => {
    return ThemeColorReplacer.varyColor.lighten(color, i / devide10);
  });
  const colorPalettes = generate(color);
  return lightens.concat(colorPalettes);
};
github ant-design / ant-design-icons / packages / icons-react / src / utils.ts View on Github external
export function getSecondaryColor(primaryColor: string): string {
  // choose the second color
  return generateColor(primaryColor)[0];
}
github ant-design / ant-design-icons / packages / icons-vue / src / utils.js View on Github external
export function getSecondaryColor(primaryColor) {
  // choose the second color
  return generateColor(primaryColor)[0];
}

@ant-design/colors

Color palettes calculator of Ant Design

MIT
Latest version published 6 months ago

Package Health Score

77 / 100
Full package analysis

Similar packages