Represents a color with RGB and opacity components. Optionally, a canonical name can be associated.
Value parameters
- blue
-
The blue component of the color, in the range [0, 255].
- green
-
The green component of the color, in the range [0, 255].
- opacity
-
The opacity of the color, in the range [0, 255]. Defaults to smile.infrastructure.Constants.MaximumOpacity.
- red
-
The red component of the color, in the range [0, 255].
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Paintclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class PresetColor
Members list
Value members
Constructors
Concrete methods
Darkens the color by a default factor.
Darkens the color by a default factor.
Attributes
- Returns
-
A new
Color
instance that is a darker version of this color. - See also
Checks if the color is fully opaque.
Checks if the color is fully opaque.
Attributes
- Returns
-
true
if the opacity is equal to smile.infrastructure.Constants.MaximumOpacity, otherwisefalse
.
Lightens the color by a default factor.
Lightens the color by a default factor.
Attributes
- Returns
-
A new
Color
instance that is a lighter version of this color. - See also
Darkens the color by a specified factor.
Darkens the color by a specified factor.
Value parameters
- shadingFactorFromZeroToOne
-
The factor to darken the color by, in the range [0, 1].
Attributes
- Returns
-
A new
Color
instance that is a darker version of this color by the specified factor.
Darkens the color by a specified percentage.
Darkens the color by a specified percentage.
Value parameters
- shadingFactorInPercents
-
The percentage to darken the color by, in the range [0, 100].
Attributes
- Returns
-
A new
Color
instance that is a darker version of this color by the specified percentage.
Lightens the color by a specified factor.
Lightens the color by a specified factor.
Value parameters
- tintingFactorFromZeroToOne
-
The factor to lighten the color by, in the range [0, 1].
Attributes
- Returns
-
A new
Color
instance that is a lighter version of this color by the specified factor.
Lightens the color by a specified percentage.
Lightens the color by a specified percentage.
Value parameters
- tintingFactorInPercents
-
The percentage to lighten the color by, in the range [0, 100].
Attributes
- Returns
-
A new
Color
instance that is a lighter version of this color by the specified percentage.
Converts the color to an ARGB integer.
Converts the color to an ARGB integer.
Attributes
- Returns
-
An integer representing the ARGB value of the color.
Converts the color to HSI (Hue, Saturation, Intensity) format.
Converts the color to HSI (Hue, Saturation, Intensity) format.
Attributes
- Returns
-
A tuple containing the HSI components of the color.
Converts the color to an RGBA integer.
Converts the color to an RGBA integer.
Attributes
- Returns
-
An integer representing the RGBA value of the color.
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Concrete fields
Attributes
- Returns
-
A
Color
object representing the average color of the paint pattern.