Abstract base class for all Ray color implementations.
Defines common interface for all color models with opacity (0.0-1.0) standardization.
- Available extensions
Constructors
- Ray()
-
const
Properties
- colorSpace → ColorSpace
-
The color space used by this Ray implementation.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- inverse → Ray
-
Returns the color with inverted color values, preserving opacity.
no setter
- luminance → double
-
Returns the relative luminance of the color (0.0 = darkest, 1.0 = lightest).
no setter
- opacity → double
-
The opacity of this color (0.0 = transparent, 1.0 = opaque).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
lerp(
Ray other, double t) → Ray -
Linearly interpolates between this color and
other. -
maxContrast(
Ray a, Ray b) → Ray -
Returns the color (
aorb) with the highest contrast to this color. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toColor(
) → Color -
Available on Ray, provided by the RayToFlutterColor extension
Converts this RayRgb8 to a Flutter Color. -
toColorSpace<
T extends Ray> () → T - Converts this color to a different color space.
-
toColorWithOpacity(
double opacity) → Color -
Available on Ray, provided by the RayToFlutterColor extension
Converts this Ray to a Flutter Color with specific opacity. -
toHsl(
) → RayHsl - Converts this color to HSL representation.
-
toJson(
) → dynamic - Returns the color as a JSON-serializable value.
-
toList(
) → List< num> - Returns the color components as a list.
-
toOklab(
) → RayOklab - Converts this color to Oklab representation.
-
toOklch(
) → RayOklch - Converts this color to Oklch representation.
-
toRgb16(
) → RayRgb16 - Converts this color to 16-bit RGB representation.
-
toRgb8(
) → RayRgb8 - Converts this color to 8-bit RGB representation.
-
toString(
) → String -
A string representation of this object.
inherited
-
withOpacity(
double opacity) → Ray - Creates a new color with different opacity (0.0-1.0).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited