tokens-studio / figma-plugin

Official repository of the plugin 'Tokens Studio for Figma' (Figma Tokens)
https://www.figma.com/community/plugin/843461159747178978
MIT License
1.32k stars 190 forks source link

Linear-Gradient Token Does Not Work With Other Color-spaces (Also When Creating Styles/Variables) #2718

Open keeganedwin opened 2 months ago

keeganedwin commented 2 months ago

Describe the bug Currently when creating color-tokens with linear-gradient values containing color-spaces like: hex-value rgba, hsl, p3, srgb only rgba and hex-values work as a color-spaces, e.g.

WOKRING: hex - linear-gradient(45deg, #87CEEB 0%, #008000 100%) rgba - linear-gradient(45deg, rgba(255,255,0) 25%, rgba(255,165,0) 75%).

Since rc8 - linear-gradient(to right, color(display-p3 1 0 0), color(display-p3 0 1 0), color(display-p3 0 0 1)) NOT WORKING: hsl - linear-gradient(140deg, hsl(34deg 100% 72%) 0%, hsl(29deg 99% 64%)) p3 - linear-gradient(to right, color(display-p3 1 0 0), color(display-p3 0 1 0), color(display-p3 0 0 1))

NOTE: The plugin is able to detect the colors (displayed in the color swatch) of these values but applying them in Figma does not work as expected. These also don't work when styles are created of them (check screenshot).

To Reproduce Steps to reproduce the behavior:

  1. Create tokens with the respective values provided above
  2. See error

Expected behavior Just like with rgba and hex-values, the plugin not only detect but also register the tokens when applied in Figma.

Screenshots or Screencasts Plugin view: CleanShot 2024-05-02 at 20 14 54@2x

Figma Styles view: CleanShot 2024-05-02 at 20 14 36@2x

Figma file (optional) File

UdayHyma commented 2 months ago

Migrated to Featurebase

keeganedwin commented 2 weeks ago

RGB is now working since rc8 and can even be applied as a style. HSL and p3 however still don't work even as tokens.