JSFiddle - React, Tailwind, and code Playground

by Harsh Kansagara

JavaScript

const colors = [
  {
    name: "--color-red-50",
    color: "oklch(.971 .013 17.38)",
  },
  {
    name: "--color-red-100",
    color: "oklch(.936 .032 17.717)",
  },
  {
    name: "--color-red-200",
    color: "oklch(.885 .062 18.334)",
  },
  {
    name: "--color-red-300",
    color: "oklch(.808 .114 19.571)",
  },
  {
    name: "--color-red-400",
    color: "oklch(.704 .191 22.216)",
  },
  {
    name: "--color-red-500",
    color: "oklch(.637 .237 25.331)",
  },
  {
    name: "--color-red-600",
    color: "oklch(.577 .245 27.325)",
  },
  {
    name: "--color-red-700",
    color: "oklch(.505 .213 27.518)",
  },
  {
    name: "--color-red-800",
    color: "oklch(.444 .177 26.899)",
  },
  {
    name: "--color-red-900",
    color: "oklch(.396 .141 25.723)",
  },
  {
    name: "--color-red-950",
    color: "oklch(.258 .092 26.042)",
  },
  {
    name: "--color-orange-50",
    color: "oklch(.98 .016 73.684)",
  },
  {
    name: "--color-orange-100",
    color: "oklch(.954 .038 75.164)",
  },
  {
    name: "--color-orange-200",
    color: "oklch(.901 .076 70.697)",
  },
  {
    name: "--color-orange-300",
    color: "oklch(.837 .128 66.29)",
  },
  {
    name: "--color-orange-400",
    color: "oklch(.75 .183 55.934)",
  },
  {
    name: "--color-orange-500",
    color: "oklch(.705 .213 47.604)",
  },
  {
    name: "--color-orange-600",
    color: "oklch(.646 .222 41.116)",
  },
  {
    name: "--color-orange-700",
    color: "oklch(.553 .195 38.402)",
  },
  {
    name: "--color-orange-800",
    color: "oklch(.47 .157 37.304)",
  },
  {
    name: "--color-orange-900",
    color: "oklch(.408 .123 38.172)",
  },
  {
    name: "--color-orange-950",
    color: "oklch(.266 .079 36.259)",
  },
  {
    name: "--color-amber-50",
    color: "oklch(.987 .022 95.277)",
  },
  {
    name: "--color-amber-100",
    color: "oklch(.962 .059 95.617)",
  },
  {
    name: "--color-amber-200",
    color: "oklch(.924 .12 95.746)",
  },
  {
    name: "--color-amber-300",
    color:...