local utils = require "lib.utils" local palette = utils.get_palette() local output = [[-- autogenerated from palette.json return { ]] for name, value in utils.opairs(palette) do for variant, v_value in utils.opairs(value) do local color = "{ l = " .. v_value.l .. ", c = " .. v_value.c .. ", h = " .. v_value.h .. "}" output = output .. " " .. name .. (variant == "normal" and "" or "_" .. variant) .. " = " .. color .. ",\n" end end output = output .. "}" print(output)