adobe / leonardo

Generate colors based on a desired contrast ratio
http://www.leonardocolor.io
Apache License 2.0
1.97k stars 109 forks source link

Additional format option for output #131

Closed NateBaldwinDesign closed 3 years ago

NateBaldwinDesign commented 3 years ago

Description

Current output formats are either extremely verbose (deep nested JSON with multiple properties per color value) or extremely simplistic (flat array of hex/rgb codes).

It would be beneficial to include another format option for the output that is a compromise between those formats, and that correlates closer to formats used as design variables:

"color100": "rgb(245, 255, 200)",
"color200": "rgb(235, 155, 198)"

Why do you need this feature?

This option would simplify transformations that may need to occur when implementing color outputs from Leonardo as design variables in a variety of platforms. For example, this type of output format would be much simpler to transform to CSS properties:

--color100: "rgb(245, 255, 200)";
--color200: "rgb(235, 155, 198)";

Leonardo package and version

alpha.9

Additional context