mikaelvesavuori / figmagic

Figmagic is the missing piece between DevOps and design: Generate design tokens, export graphics, and extract design token-driven React components from your Figma documents.
https://docs.figmagic.com
MIT License
807 stars 71 forks source link

Support both Hex and RGBA #113

Closed CodeByAlex closed 2 years ago

CodeByAlex commented 2 years ago

Is your feature request related to a problem? Please describe. When I generate the values based on the figma docs, I would like the option to add to the configuration the format of colors (hex/rgba)

Describe the solution you'd like there is already a function in the codebase to convert rgba to hex error. That can be leveraged to convert the value to hex based on the configuration .

mikaelvesavuori commented 2 years ago

Hi! Thanks for this.

This is trivial to support, but has some unintentional problems if used together with element generation (matching tokens to values, which at that point have been transformed). Working on this and trying to figure out a good solution.

mikaelvesavuori commented 2 years ago

Hi! This should now be resolved in version 4.3.4. See https://github.com/mikaelvesavuori/figmagic/releases/tag/v4.3.4