ColorConverter class

A class for converting between color spaces.

Constructors

ColorConverter.new()

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

color2colorRgb(Color color) ColorRgb
Converts a Color object to a ColorRgb object.
color2colorRgbNormalized(Color color) ColorRgbNormalized
Converts a Color object to a ColorRgbNormalized object.
color2colorXy(Color color) ColorXy
Converts a Color object to a ColorXy object.
color2hex(Color color) String
Converts a Color object to a hex string.
color2hsl(Color color) List<double>
Converts a Color object to HSL values.
color2hsv(Color color) List<double>
Converts a Color object to HSV values.
color2int(Color color) int
Converts a Color object to an integer.
color2rgb(Color color) List<int>
Converts a Color object to RGB (0-255) values.
color2rgb2(Color color) List<double>
Converts a Color object to normalized RGB (0.0-1.0) values.
color2xy(Color color) List<double>
Converts a Color object to xy coordinates in the CIE 1931 color space.
hex2color(dynamic hex) → Color
Converts a hex string to a Color object.
hex2colorRgb(dynamic hex) ColorRgb
Converts a hex string to a ColorRgb object.
hex2colorRgbNormalized(dynamic hex) ColorRgbNormalized
Converts a hex string to a ColorRgbNormalized object.
hex2colorXy(dynamic hex) ColorXy
Converts a hex string to a ColorXy object.
hex2hsl(dynamic hex) List<double>
Converts a hex string to HSL values.
hex2hsv(dynamic hex) List<double>
Converts a hex string to HSV values.
hex2int(dynamic hex) int
Converts a hex string to an integer.
hex2rgb(dynamic hex) List<int>
Converts a hex string to RGB (0-255) values.
hex2rgb2(dynamic hex) List<double>
Converts a hex string to normalized RGB (0.0-1.0) values.
hex2xy(dynamic hex) List<double>
Converts a hex string to xy coordinates in the CIE 1931 color space.
hsl2color(int h, double s, double l) → Color
Converts HSL values to a Color object.
hsl2colorRgb(int h, double s, double l) ColorRgb
Converts HSL values to a ColorRgb object.
hsl2colorRgbNormalized(int h, double s, double l) ColorRgbNormalized
Converts HSL values to a ColorRgbNormalized object.
hsl2colorXy(int h, double s, double l) ColorXy
Converts HSL values to a ColorXy object.
hsl2hex(int h, double s, double l) String
Converts HSL values to a hex string.
hsl2hsv(int h, double s, double l) List<double>
Converts HSL values to HSV values.
hsl2int(int h, double s, double l) int
Converts HSL values to an integer.
hsl2rgb(int h, double s, double l) List<int>
Converts HSL values to RGB (0-255) values.
hsl2rgb2(int h, double s, double l) List<double>
Converts HSL values to normalized RGB (0.0-1.0) values.
hsl2xy(int h, double s, double l) List<double>
Converts HSL values to xy coordinates in the CIE 1931 color space.
hsv2color(int h, double s, double v) → Color
Converts HSV values to a Color object.
hsv2colorRgb(int h, double s, double v) ColorRgb
Converts HSV values to a ColorRgb object.
hsv2colorRgbNormalized(int h, double s, double v) ColorRgbNormalized
Converts HSV values to a ColorRgbNormalized object.
hsv2colorXy(int h, double s, double v) ColorXy
Converts HSV values to a ColorXy object.
hsv2hex(int h, double s, double v) String
Converts HSV values to a hex string.
hsv2hsl(int h, double s, double v) List<double>
Converts HSV values to HSL values.
hsv2int(int h, double s, double v) int
Converts HSV values to an integer.
hsv2rgb(int h, double s, double v) List<int>
Converts HSV values to RGB (0-255) values.
hsv2rgb2(int h, double s, double v) List<double>
Converts HSV values to normalized RGB (0.0-1.0) values.
hsv2xy(int h, double s, double v) List<double>
Converts HSV values to xy coordinates in the CIE 1931 color space.
int2color(int integer) → Color
Converts an integer to a Color object.
int2colorRgb(int integer) ColorRgb
Converts an integer to a ColorRgb object.
int2colorRgbNormalized(int integer) ColorRgbNormalized
Converts an integer to a ColorRgbNormalized object.
int2colorXy(int integer) ColorXy
Converts an integer to a ColorXy object.
int2hex(int integer) String
Converts an integer to a hex string.
int2hsl(int integer) List<double>
Converts an integer to HSL values.
int2hsv(int integer) List<double>
Converts an integer to HSV values.
int2rgb(int integer) List<int>
Converts an integer to RGB (0-255) values.
int2rgb2(int integer) List<double>
Converts an integer to normalized RGB (0.0-1.0) values.
int2xy(int integer) List<double>
Converts an integer to xy coordinates in the CIE 1931 color space.
rgb2color(int r, int g, int b) → Color
Converts RGB (0-255) values to a Color object.
rgb2color2(double r, double g, double b) → Color
Converts normalized RGB (0.0-1.0) values to a Color object.
rgb2colorRgb(int r, int g, int b) ColorRgb
Converts RGB (0-255) values to a ColorRgb object.
rgb2colorRgb2(double r, double g, double b) ColorRgb
Converts normalized RGB (0.0-1.0) values to a ColorRgb object.
rgb2colorRgbNormalized(int r, int g, int b) ColorRgbNormalized
Converts RGB (0-255) values to a ColorRgbNormalized object.
rgb2colorRgbNormalized2(double r, double g, double b) ColorRgbNormalized
Converts normalized RGB (0.0-1.0) values to a ColorRgbNormalized object.
rgb2colorXy(int r, int g, int b) ColorXy
Converts RGB (0-255) values to a ColorXy object.
rgb2colorXy2(double r, double g, double b) ColorXy
Converts normalized RGB (0.0-1.0) values to a ColorXy object.
rgb2hex(int r, int g, int b) String
Converts RGB (0-255) values to a hex string.
rgb2hex2(double r, double g, double b) String
Converts normalized RGB (0.0-1.0) values to a hex string.
rgb2hsl(int r, int g, int b) List<double>
Converts RGB (0-255) values to HSL values.
rgb2hsl2(double r, double g, double b) List<double>
Converts normalized RGB (0.0-1.0) values to HSL values.
rgb2hsv(int r, int g, int b) List<double>
Converts RGB (0-255) values to HSV values.
rgb2hsv2(double r, double g, double b) List<double>
Converts normalized RGB (0.0-1.0) values to HSV values.
rgb2int(int r, int g, int b, [int a = 255]) int
Converts RGB (0-255) values to an integer.
rgb2int2(double r, double g, double b, [double a = 1.0]) int
Converts normalized RGB (0.0-1.0) values to an integer.
rgb2xy(int r, int g, int b) List<double>
Converts RGB (0-255) values to xy coordinates in the CIE 1931 color space.
rgb2xy2(double r, double g, double b) List<double>
Converts normalized RGB (0.0-1.0) values to xy coordinates in the CIE 1931 color space.
xy2color(double x, double y, [double brightness = 1.0]) → Color
Converts xy coordinates in the CIE 1931 color space to a Color.
xy2colorRgb(double x, double y, [double brightness = 1.0]) ColorRgb
Converts xy coordinates in the CIE 1931 color space to a ColorRgb object.
xy2colorRgbNormalized(double x, double y, [double brightness = 1.0]) ColorRgbNormalized
Converts xy coordinates in the CIE 1931 color space to a ColorRgbNormalized object.
xy2colorXy(double x, double y, [double brightness = 1.0]) ColorXy
Converts xy coordinates in the CIE 1931 color space to a ColorXy object.
xy2hex(double x, double y, [double brightness = 1.0]) String
Converts xy coordinates in the CIE 1931 color space to a hex string.
xy2hsl(double x, double y, [double brightness = 1.0]) List<double>
Converts xy coordinates in the CIE 1931 color space to HSL.
xy2hsv(double x, double y, [double brightness = 1.0]) List<double>
Converts xy coordinates in the CIE 1931 color space to HSV.
xy2int(double x, double y, [double brightness = 1.0]) int
Converts xy coordinates in the CIE 1931 color space to an integer.
xy2rgb(double x, double y, [double brightness = 1.0]) List<int>
Converts xy coordinates in the CIE 1931 color space to RGB (0-255) values.
xy2rgb2(double x, double y, [double brightness = 1.0]) List<double>
Converts xy coordinates in the CIE 1931 color space to normalized RGB (0.0-1.0) values.