Skip to content

Instantly share code, notes, and snippets.

@barklund
Last active February 26, 2020 21:31
Show Gist options
  • Save barklund/3ab7c9ba11fdf826952a5731ac7e1de0 to your computer and use it in GitHub Desktop.
Save barklund/3ab7c9ba11fdf826952a5731ac7e1de0 to your computer and use it in GitHub Desktop.
Percentage: float(0..1)
Dimension: int(0..255)
Angle: int(0..360)
Color: object(
r: Dimension,
g: Dimension,
b: Dimension,
a: Percentage,
)
Stop: object(
color: Color,
stop: Percentage,
)
PatternType: string('opaque','linear','radial','conic')
Pattern: object(
type: PatternType,
color: Color, // only used for type=opaque
stops: array(Stop), // only used for type=linear,radial,conic
angle: Angle, // only used for type=linear,conic
center: array(Percentage)[2], // only used for type=radial,conic
size: array(Percentage)[2], // only used for type=radial
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment