tiltshift / figmint

sync Figma styles to JS
MIT License
97 stars 7 forks source link

Update export format #17

Closed chrisdrackett closed 4 years ago

chrisdrackett commented 4 years ago

Right now fillStyles and textStyles both export as arrays. I think it would be a bit more user-friendly to export these in an object with the name of the style as a key. I also think grouping these as color gradient image would be useful.

questions:

possible format:


{
  colors: {
    colorName: "hsla(360, 100%, 100%, 1.0)"
  },
  gradients: {
    gradientName: {
      type: "GRADIENT_LINEAR",
      blendMode: "NORMAL",
      stops: [
        {
          color: "hsl(216, 100%, 50%)",
          y: 0,
          x: undefined
        },
        {
          color: "hsl(191, 100%, 55%)",
          y: 0.5310521125793457,
          x: undefined
        },
        {
          color: "hsl(122, 97%, 75%)",
          y: 1,
          x: undefined
        }
      ]
    }
  }
}