/* eslint-disable no-unused-vars */


  export function generateDifferentColors(x) {
    const colors = [];
    const step = 360 / x; // Calculate the step size for hue
  
    for (let i = 0; i < x; i++) {
      const hue = i * step;
      const saturation = 50; // You can adjust saturation and lightness as needed
      const lightness = 50; // for your desired color appearance
  
      // Convert HSL to RGB
      const rgbColor = hslToRgb(hue / 360, saturation / 100, lightness / 100);
  
      // Convert RGB to HEX
      const hexColor = rgbToHex(rgbColor[0], rgbColor[1], rgbColor[2]);
  
      colors.push(hexColor);
    }
  
    return colors;
  }
  
  function hslToRgb(h, s, l) {
    let r, g, b;
  
    if (s === 0) {
      r = g = b = l; // Achromatic
    } else {
      const hueToRgb = (p, q, t) => {
        if (t < 0) t += 1;
        if (t > 1) t -= 1;
        if (t < 1 / 6) return p + (q - p) * 6 * t;
        if (t < 1 / 2) return q;
        if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
        return p;
      };
  
      const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
      const p = 2 * l - q;
  
      r = hueToRgb(p, q, h + 1 / 3);
      g = hueToRgb(p, q, h);
      b = hueToRgb(p, q, h - 1 / 3);
    }
  
    return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
  }
  
  function rgbToHex(r, g, b) {
    return `#${(1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1).toUpperCase()}`;
  }
  
  //const numberOfColors = 10; // Change this to the number of colors you want
  //const differentColors = generateDifferentColors(numberOfColors);
  //console.log(differentColors);
  
  export default {
    name: 'generateColors',
    props: {
    }
  }
