code: function palette({ baseColor: themeColor = baseColor, src = 'css/rsuite.min.css', dist } = {}, doneCallback) {
  
    try {
      if (!dist) {
        throw  `ERROR: [option.dist] is required`;
      }
    } catch (e) {
      console.log(e.red);
      return;
    }
  
    const originColors = color.calcColors(baseColor);
    const themeColors = color.calcColors(themeColor);
    const distPath = Path.dirname(dist);
  
    const ensureDir = path => new Promise((resolve) => {
      fse.ensureDir(path, () => resolve());
    });
  
    const readData = path => new Promise(resolve => {
      fs.readFile(path, 'utf-8', (err, data) => {
        resolve(data || '');
      });
    });
  
    const writeData = (path, data) => new Promise((resolve, reject) => {
      fs.writeFile(path, data, (err) => {
        if (err) {
          reject(err);
        }
        resolve();
      });
    });
  
    const handleCallback = (...args) => doneCallback && doneCallback(args);
  
    const generateThemes = async function () {
      try {
        await ensureDir(distPath);
        let data = await readData(Path.join(rootPath, src));
        originColors.forEach((color, index) => {
          data = data.replace(new RegExp(color, 'g'), themeColors[index]);
        });
        await  writeData(dist, data);
        console.log(`Palette ${dist}` + '[SUCCESS]'.green);
        handleCallback();
      } catch (e) {
        console.log(`Palette ${dist}` + '[FAILD]'.red);
        handleCallback(e);
      }
    };
  
    generateThemes();
  
    return module.exports;
  }
docs: 画板方法
  @param {Object} options