How to use the @ant-design/colors/lib/generate.default 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 gem-mine / ui-theme-color / src / helper.js View on Github external
function getSerials(color, client) {
  const lightNum = 9
  const devide10 = 10
  // 淡化(即less的tint)
  const lightens = new Array(lightNum).fill(undefined).map((_, i) => {
    return client.varyColor.lighten(color, i / devide10)
  })
  const colorPalettes = generate(color)
  return lightens.concat(colorPalettes)
}

@ant-design/colors

Color palettes calculator of Ant Design

MIT
Latest version published 25 days ago

Package Health Score

85 / 100
Full package analysis

Similar packages