Create color variable
collection.createColorVariable(name, value)
Create a color variable with a name and value for the variable.
Once created, you can set color variables for: Text colors, Background colors, Border and text stroke colors, and Gradient color stops
Syntax
Parameters
- name : string - Name of the variable
- value: string - Value of the variable. Value can be a string in one of three formats:
- Color Name
- Color rgb hex value
- Color rgba hex value
Returns
Promise<ColorVariable>
A Promise that resolves to a ColorVariable object.