JColorUtils class

A utility class for performing color manipulations.

The ColorUtils class provides static methods for common color transformations, such as shifting brightness, parsing hexadecimal color strings, and blending two colors.

Example Usage

final color = ColorUtils.shiftHsl(Colors.blue, 0.2); // Lighten the color.
final parsedColor = ColorUtils.parseHex("#FF5733"); // Parse a hex color string.
final blendedColor = ColorUtils.blend(Colors.red, Colors.blue, 0.5); // Blend red and blue.

Constructors

JColorUtils()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

blend(Color dst, Color src, double opacity) → Color
Blends two colors with a specified opacity.
parseHex(String value) → Color
Parses a hexadecimal color string into a Color.
shiftHsl(Color c, [double amt = 0]) → Color
Shifts the lightness of a color in the HSL color space.