Skip to content

Color Component


For: int values

This component will display a slider for setting color.

Color-Slider

Recommended Usage

This should be used when you want to adjust an RGB value.


color(String name, @Nonnull ColorLink link)

// Example
color("Text color", color);

Name

The name of the color slider.

Color linker

When using this component you should use linkColor, which lets you link several different components together. This would be used to link color with saturation and brightness.

linkColor(String redConfig, String greenConfig, String blueConfig)

Example

Linking one color:

linkColor("red", "green", "blue");

Linking several individual colors:

ColorLink color = linkColor("red", "green", "blue");
ColorLink color2 = linkColor("red2", "green2", "blue2");

They require @Config fields for red, green, blue.

Config Fields

@Config public int red = 255;
@Config public int green = 255;
@Config public int blue = 255;