Basics
Guides
API Reference
Basics
Guides
API Reference
[12:7] extends: FxObj
Wraps JavaFX Color, an immutable representation of a color in the sRGB color space. Colors are used for fills, strokes, backgrounds, and text throughout JavaFX. This class provides factory methods to create a color from a web hex string or from individual red, green, and blue channel values, each with an optional alpha transparency value.
Color (string Val = null, double Alpha = 1.0)
Creates a new Color object with the provied optional hex string and alpha double values.
Val is an optional string with the web hex value to set. (ex. #ffffff)Alpha is an optional double between 0 and 1 with the alpha value.this objectweb (string Val, double Alpha = 1.0)
Set the color value ith the provied hex string and optional alpha double values.
Val is an optional string with the web hex value to set. (ex. #ffffff)Alpha is an optional double between 0 and 1 with the alpha value.this objectrgb (double Red, double Blue, double Green)
Set the color value ith the provied red blue green values.
Red is a double with the red part. (0.0-255.0)Blue is a double with the blue part. (0.0-255.0)Green is a double with the green part. (0.0-255.0)this objectgetRed ()
Returns the red channel value in the range 0.0 to 1.0.
A double with the red channel.getGreen ()
Returns the green channel value in the range 0.0 to 1.0.
A double with the green channel.getBlue ()
Returns the blue channel value in the range 0.0 to 1.0.
A double with the blue channel.getOpacity ()
Returns the opacity value in the range 0.0 to 1.0.
A double with the opacity.isOpaque ()
Returns true when opacity is 1.0.
A bool.getHue ()
Returns the hue component in HSB color space, in degrees.
A double with the hue.getSaturation ()
Returns the saturation component in HSB color space (0.0 to 1.0).
A double with the saturation.getBrightness ()
Returns the brightness component in HSB color space (0.0 to 1.0).
A double with the brightness.brighter ()
Returns a brighter copy of this color.
An AJO around a new javafx.scene.paint.Color.darker ()
Returns a darker copy of this color.
An AJO around a new javafx.scene.paint.Color.saturate ()
Returns a more saturated copy of this color.
An AJO around a new javafx.scene.paint.Color.desaturate ()
Returns a less saturated copy of this color.
An AJO around a new javafx.scene.paint.Color.grayscale ()
Returns a grayscale copy of this color using the luminance formula.
An AJO around a new javafx.scene.paint.Color.invert ()
Returns the inverted copy of this color (channels subtracted from 1.0).
An AJO around a new javafx.scene.paint.Color.deriveColor (double HueShift, double SaturationFactor, double BrightnessFactor, double OpacityFactor)
Returns a new Color derived from this one by adding the given offsets to hue, saturation, brightness, and opacity.
HueShift is a double with the hue offset in degrees.SaturationFactor is a double with the saturation multiplier.BrightnessFactor is a double with the brightness multiplier.OpacityFactor is a double with the opacity multiplier.An AJO around a new javafx.scene.paint.Color.interpolate (Other, double T)
Returns a Color linearly interpolated between this color and Other.
Other is a Color wrapper or an AJO around a javafx.scene.paint.Color.T is a double in the range 0.0 to 1.0 with the interpolation factor.An AJO around a new javafx.scene.paint.Color.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.