How to use the @ant-design/colors.generate function in @ant-design/colors

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 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];
}
github ant-design / ant-design-icons / packages / icons-angular / src / utils.ts View on Github external
export function getSecondaryColor(primaryColor: string): string {
  return generateColor(primaryColor)[0];
}
github ant-design / ant-design / site / theme / template / Color / ColorPatterns.jsx View on Github external
export default function ColorPatterns({ color }) {
  return generate(color).map((colorString, i) => (
    
  ));
}
github raohong / antd-color-replacer / lib / utils / antdColorPalette.js View on Github external
exports.getAntdSerials = (primaryColor, tintModulus = 0.1) => {
    const num = Math.floor(1 / tintModulus) - 1;
    const tintColors = Array.from({ length: num }, (_, i) => tint_1.default(primaryColor, i * tintModulus));
    return tintColors.concat(colors_1.generate(primaryColor));
};
exports.default = exports.getAntdSerials;

@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