Color

sfml.graphics.Color
See theColor companion trait
object Color

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Color.type

Members list

Type members

Classlikes

object ctor

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ctor.type

Value members

Concrete methods

def Black(): Color

Black predefined color.

Black predefined color.

Attributes

def Blue(): Color

Blue predefined color.

Blue predefined color.

Attributes

def Cyan(): Color

Cyan predefined color.

Cyan predefined color.

Attributes

def Green(): Color

Green predefined color.

Green predefined color.

Attributes

def Magenta(): Color

Magenta predefined color.

Magenta predefined color.

Attributes

def Red(): Color

Red predefined color.

Red predefined color.

Attributes

Transparent (black) predefined color.

Transparent (black) predefined color.

Attributes

def White(): Color

White predefined color.

White predefined color.

Attributes

def Yellow(): Color

Yellow predefined color.

Yellow predefined color.

Attributes

def apply(): Color

Default constructor.

Default constructor.

Constructs an opaque black color. It is equivalent to Color(0, 0, 0, 255)

Attributes

def apply(red: Int, green: Int, blue: Int, alpha: Int = ...): Color

Construct the color from its 4 RGBA components.

Construct the color from its 4 RGBA components.

Value parameters

alpha

Alpha (opacity) component (in the range [0, 255])

blue

Blue component (in the range [0, 255])

green

Green component (in the range [0, 255])

red

Red component (in the range [0, 255])

Attributes

def apply(color: Int): Color

Construct the color from 32-bit unsigned integer.

Construct the color from 32-bit unsigned integer.

Value parameters

color

Number containing the RGBA components (in that order)

Attributes

def unapply(color: Color): (Int, Int, Int, Int)

Extensions

Extensions

extension (self: Immutable[Color])
def a: Int
def b: Int
def g: Int
def r: Int
def toInteger: Int