Closed JonLz closed 3 years ago
I added this validation to show an error when a designer forget to add a dark variant of color that exists in light palette.
Your proposal is correct. Some colors might be universal. I think we can modify this validation to treat error as warning. FigmaExport will not stop exporting colors if there is no dark color for light color with the same name and vise versa. FigmaExport will shows warning in the output: Using color COLOR_NAME as universal color because it is not found in the dark palette
. This rule will also apply to illustrations.
I was curious about the validation that ensures there is a corresponding dark mode color for every light mode color. In some cases, a design system might only have a single color that is used across both the light and dark color palette.
Consider something like this:![image](https://user-images.githubusercontent.com/2197233/107565502-ca28ff80-6bb1-11eb-86db-6aaad93e0e28.png)
What do you think about adding a configuration option to opt out of that warning? Then the xcode exporter step can check if only a light color exists, it turns it into a color set with the
None
appearances option. This color will then not respond to appearance changes.