Represents and manipulates colours, including native colour preview windows.
Object functions
- brighten [1.14.11+]
Brightens the Colour object in place by moving each RGB channel 30 percent towards 255.
- complement [1.14.11+]
Rotates the Colour object's hue by 180 degrees to produce its complementary colour in place. Preserves brightness, saturation, and alpha, and returns the Colour object.
- construct [1.13.8+]
Constructs a Colour object from a string representation or from numeric red, green, blue, and optional alpha components. Three-digit shorthand hexadecimal values such as
#f60and four-digit alpha shorthand such as#f60aare expanded automatically. Eight-digit values use the#RRGGBBAAform. Numeric RGB channels range from 0 to 255 and alpha ranges from 0.0 to 1.0. The supplied string is parsed into an internal java.awt.Color instance. The constructor returns the Colour object itself. - darken [1.14.11+]
Darkens the Colour object in place by reducing each RGB channel by 30 percent.
- display [1.14.11+]
Opens a small native window filled with the colour and titled with its hexadecimal code. Translucent colours use the eight-digit #RRGGBBAA form.
- greyscale [1.14.11+]
Converts the Colour object to greyscale in place using a luminance-weighted RGB conversion. Preserves alpha and returns the Colour object.
- invert [1.14.11+]
Inverts each RGB channel of the Colour object in place. Preserves alpha and returns the Colour object.
- sepia [1.14.11+]
Applies a warm sepia effect to the Colour object in place. Preserves alpha and returns the Colour object.

There are no comments on this page.
Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days. Your email address is stored so that replies can be sent to your email address.
Comments powered by BalfComment