
JSON
Here’s the JSON format of this object :
{
"colors": LIST OF COLOR OBJECTS,
"enabled": BOOL,
"endPoint": { // Used only for axial value
"x": FLOAT, // Between 0 & 1,
"y": FLOAT // Between 0 & 1
},
"name": STRING,
"type": { "axial", "radial" }, // Default value "axial",
"startPoint": {
"x": FLOAT, // Between 0 & 1,
"y": FLOAT, // Between 0 & 1
}
}
This JSON format describes the gradient atom. The gradient atom has several properties, including:
"colors": a list of color objects that define the gradient.
"enabled": a boolean value that indicates whether the gradient is enabled or not.
"endPoint": an object that defines the end point of the gradient, used only for axial gradients. It has two properties, "x" and "y", which are floats between 0 and 1 that represent the horizontal and vertical positions of the end point.
"name": a string that gives the gradient a name.
"type": the kind of gradient, either "axial" or "radial" (default "axial"). An axial gradient runs in a straight line from the start point to the end point. A radial gradient radiates outward from a center, which is defined by the start point.
"startPoint": an object that defines the start point of the gradient. It has two properties, "x" and "y", which are floats between 0 and 1 that represent the horizontal and vertical positions of the start point. For a radial gradient, the start point is the center from which the gradient radiates.
Design