Class Gradient<T extends Color>
java.lang.Object
org.strassburger.colorlab4j.gradients.Gradient<T>
- Direct Known Subclasses:
HSLGradient,HSVGradient,LABGradient,RGBGradient,XYZGradient
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
colors
-
-
Constructor Details
-
Gradient
Create a new gradient- Parameters:
colors- The list of colors that define the gradient
-
Gradient
Create a new gradient- Parameters:
start- The start colorend- The end color
-
Gradient
Create a new gradient- Parameters:
colors- The colors that define the gradient
-
-
Method Details
-
getColors
Get the colors of the gradient (including the start and end color)- Parameters:
steps- The number of steps (excluding the start and end color)- Returns:
- The colors of the gradient
-
getColors
Get the colors of the gradient- Parameters:
steps- The number of stepsincludeStartAndEnd- Whether to include the start and end color- Returns:
- The colors of the gradient
-
printGradient
public void printGradient(int steps) Print the gradient- Parameters:
steps- The number of steps
-