Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
};
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 {
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 {
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) {
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);
};
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);
};
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 {
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);
};
export function getSecondaryColor(primaryColor: string): string {
// choose the second color
return generateColor(primaryColor)[0];
}
export function getSecondaryColor(primaryColor) {
// choose the second color
return generateColor(primaryColor)[0];
}