Color

eu.joaocosta.minart.graphics.Color$
See theColor companion class
object Color

Attributes

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

Members list

Concise view

Value members

Concrete methods

def apply(r: Int, g: Int, b: Int): Color

Creates a new color from RGB values (on the [0-255] range). Overflow/Underflow will wrap around.

Creates a new color from RGB values (on the [0-255] range). Overflow/Underflow will wrap around.

Attributes

def apply(r: Byte, g: Byte, b: Byte): Color

Creates a new color from RGB values (assuming unsinged bytes on the [0-255] range).

Creates a new color from RGB values (assuming unsinged bytes on the [0-255] range).

Attributes

def fromBGR(bgr: Int): Color

Creates a new color from a 24bit backed BGR integer. Ignores the first byte of a 32bit number.

Creates a new color from a 24bit backed BGR integer. Ignores the first byte of a 32bit number.

Attributes

def fromRGB(rgb: Int): Color

Creates a new color from a 24bit backed RGB integer. Ignores the first byte of a 32bit number.

Creates a new color from a 24bit backed RGB integer. Ignores the first byte of a 32bit number.

Attributes

def grayscale(gray: Int): Color

Creates a new color from a grayscale value (on the [0-255] range). Overflow/Underflow will wrap around.

Creates a new color from a grayscale value (on the [0-255] range). Overflow/Underflow will wrap around.

Attributes

def grayscale(gray: Byte): Color

Creates a new color from a grayscale value (assuming unsigned bytes on the [0-255] range).

Creates a new color from a grayscale value (assuming unsigned bytes on the [0-255] range).

Attributes

def unapply(color: Color): Some[(Int, Int, Int)]

Extracts the RGB channels of a color.

Extracts the RGB channels of a color.

Attributes