Gradient:
Filter:
Classes | GUI > Accessories

Gradient : Object

A linear color fade between two colors
Source: Gradient.sc

Description

NOTE: The use of Gradient is not supported yet. When Gradient is used in place of Color, the average gradient color will be used instead.

Class Methods

Gradient.new(color1, color2, direction: 'h', steps: 64)

Arguments:

color1

An instance of Color.

color2

An instance of Color.

direction

\h or \v for horizontal and vertical respectively. Default value is \h.

steps

The resolution of the gradient. Default value is 64.

Inherited class methods

Instance Methods

.at(pos)

Retrieve the colour at position pos, typically a value between zero and one. at(0) is color1, and at(1) is color2.

Arguments:

pos

Inherited instance methods

Examples