smile.colors

package smile.colors

Members list

Type members

Classlikes

object Color

Provides utility methods for creating and converting colors in various color spaces and formats, including HSI (Hue, Saturation, Intensity) and RGBA (Red, Green, Blue, Alpha). It also supports operations to lighten or darken colors.

Provides utility methods for creating and converting colors in various color spaces and formats, including HSI (Hue, Saturation, Intensity) and RGBA (Red, Green, Blue, Alpha). It also supports operations to lighten or darken colors.

Attributes

See also

java.awt.Color

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Color.type
case class Color(red: Int, green: Int, blue: Int, opacity: Int) extends Paint

Represents a color with RGB and opacity components. Optionally, a canonical name can be associated.

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
Supertypes
trait Serializable
trait Product
trait Equals
trait Paint
class Object
trait Matchable
class Any
Show all
Known subtypes
class PresetColor

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class LinearGradient(start: Pos, end: Pos, fractions: Seq[Float], colors: Seq[Color], cycleMethod: CycleMethod) extends Paint

Represents a linear gradient paint with two or more colors. The start and end points are specified in the local coordinate space of the shape.

Represents a linear gradient paint with two or more colors. The start and end points are specified in the local coordinate space of the shape.

Value parameters

colors

A sequence of Color objects corresponding to each fraction in the gradient.

cycleMethod

The method used to repeat the gradient pattern if the shape to be filled is larger than the gradient defined by the start and end points.

end

The ending position of the gradient.

fractions

A sequence of float values in the range [0.0f, 1.0f] indicating the fractional distances along the gradient at which color changes occur.

start

The starting position of the gradient.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Paint
class Object
trait Matchable
class Any
Show all
trait Paint

A trait representing a paint pattern. Paints can be used as the fill or stroke of a shape.

A trait representing a paint pattern. Paints can be used as the fill or stroke of a shape.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Color
class PresetColor
class PresetColor(argbInt: Int, val canonicalName: String) extends Color

Represents a predefined color with a canonical name, extending the Color class.

Represents a predefined color with a canonical name, extending the Color class.

Value parameters

argbInt

The ARGB integer representing the color.

canonicalName

The canonical name for the color.

Attributes

Constructor

Creates a PresetColor from an ARGB integer and a canonical name.

Companion
object
Supertypes
class Color
trait Serializable
trait Product
trait Equals
trait Paint
class Object
trait Matchable
class Any
Show all
object PresetColor

Companion object for the PresetColor class, defining a collection of predefined colors with canonical names.

Companion object for the PresetColor class, defining a collection of predefined colors with canonical names.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type