Preview:
const colors = ["blue", "red", "cyan", "yellow", "orange", "black", "white", "pink", "green", "purple"];
const randomColors = [];

for (let i = 0; i < 3; i++){
      const randomNumbers = Math.floor(Math.random() * colors.length);
      randomColors.push(colors[randomNumbers])
};

console.log(randomColors);
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter