docs: function generateImage({
      fontSize = null,
      color = '#fff',
      background = '#616161',
      text = '',
      size = [600, 200],
    }) {
      const width = size[0],
        height = size[1],
        fontFamily = 'sans-serif';
  
      if (!fontSize) { // 取宽度的 1/8
        fontSize = (width / 8).toFixed();
      }
      const canvas = document.createElement('canvas');
      const ctx = canvas.getContext('2d');
  
      canvas.width = width;
      canvas.height = height;
      ctx.fillStyle = background;
      ctx.fillRect(0, 0, width, height);
  
      // 背景上设置小点
      ctx.fillStyle = contrast(background);
      const pointX = width / 2;
      const pointY = height / 2;
      for (let i = 0; i < pointY; i++) {
        for (let j = 0; j < pointX; j++) {
          ctx.fillRect(i * 20 + 9, j * 20 + 9, 2, 2);
        }
      }
  
      ctx.textAlign = 'center';
      ctx.textBaseline = 'middle';
      ctx.fillStyle = color;
      ctx.font = `bold ${fontSize}px ${fontFamily}`;
      ctx.fillText(text, (width / 2), (height / 2), width);
  
      return canvas.toDataURL('image/png');
    }