Package com.smartgwt.client.types
Enum ColorFormat
- All Implemented Interfaces:
ValueEnum,Serializable,Comparable<ColorFormat>,Constable
Target format for
Colors.getColor() and Colors.getString(), and optional format filter for Colors.isColor().-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetValue()static ColorFormatReturns the enum constant of this type with the specified name.static ColorFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
RGB
RGB (Red, Green, Blue). As an object: {r, g, b, alpha} with r/g/b as integers 0-255 and alpha as a float 0-1. As a string: "rgb(R, G, B)" or "rgba(R, G, B, A)".If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "rgb". -
HSL
HSL (Hue, Saturation, Lightness). As an object: {h, s, l, alpha} with h 0-360 degrees, s/l 0-100 percent, and alpha 0-1. As a string: "hsl(H, S%, L%)" or "hsla(H, S%, L%, A)".If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "hsl". -
HEX
Hexadecimal HTML color. String only (not used as a getColor target): "#RRGGBB" when fully opaque, "#RRGGBBAA" when semi-transparent. Each pair is a two-digit hex value 00-FF for red, green, blue, and optionally alpha.If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "hex". -
OKLCH
Oklch (OK Lightness, Chroma, Hue) -- a perceptually uniform color space where equal numeric changes produce visually equal differences. As an object: {L, C, h, alpha} with L (lightness) 0-1, C (chroma/saturation) typically 0-0.4, h (hue angle) 0-360 degrees, and alpha 0-1. As a string: "oklch(L% C h)" or "oklch(L% C h / A)".If this enumerated value is used in a
Component XMLfile or server-side DataSource descriptor (.ds.xml file), use the value "oklch".
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
-