Color

eu.joaocosta.minart.graphics.Color$package.Color
object Color

Attributes

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

Members list

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: Int, g: Int, b: Int, a: Int): Color

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

Creates a new color from RGBA 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 apply(r: Byte, g: Byte, b: Byte, a: Byte): Color

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

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

Attributes

inline def fromABGR(abgr: Int): Color

Creates a new color from a 32bit backed ABGR integer.

Creates a new color from a 32bit backed ABGR integer.

Attributes

inline def fromARGB(argb: Int): Color

Creates a new color from a 32bit backed ARGB integer.

Creates a new color from a 32bit backed ARGB integer.

Attributes

inline 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

inline 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

Extensions

Extensions

extension (color: Color)
def *(that: Color): Color

Combines this with another color by multiplying each RGB value (on the [0.0, 1.0] range). Values are clamped on overflow.

Combines this with another color by multiplying each RGB value (on the [0.0, 1.0] range). Values are clamped on overflow.

The resulting alpha is set to 255.

Attributes

def *:(that: Color): Color

Combines this with another color by multiplying each RGB value (on the [0.0, 1.0] range). Values are clamped on overflow.

Combines this with another color by multiplying each RGB value (on the [0.0, 1.0] range). Values are clamped on overflow.

The alpha of the right-side argument is kept.

Attributes

def +(that: Color): Color

Combines this with another color by summing each RGB value. Values are clamped on overflow.

Combines this with another color by summing each RGB value. Values are clamped on overflow.

The resulting alpha is set to 255.

Attributes

def +:(that: Color): Color

Combines this with another color by summing each RGB value. Values are clamped on overflow.

Combines this with another color by summing each RGB value. Values are clamped on overflow.

The alpha of the right-side argument is kept.

Attributes

def -(that: Color): Color

Combines this with another color by subtracting each RGB value. Values are clamped on underflow.

Combines this with another color by subtracting each RGB value. Values are clamped on underflow.

The resulting alpha is set to 255.

Attributes

def -:(that: Color): Color

Combines this with another color by subtracting each RGB value. Values are clamped on underflow.

Combines this with another color by subtracting each RGB value. Values are clamped on underflow.

The alpha of the right-side argument is kept.

Attributes

def :*(that: Color): Color

Combines this with another color by multiplying each RGB value (on the [0.0, 1.0] range). Values are clamped on overflow.

Combines this with another color by multiplying each RGB value (on the [0.0, 1.0] range). Values are clamped on overflow.

The alpha of the left-side argument is kept.

Attributes

def :+(that: Color): Color

Combines this with another color by summing each RGB value. Values are clamped on overflow.

Combines this with another color by summing each RGB value. Values are clamped on overflow.

The alpha of the left-side argument is kept.

Attributes

def :-(that: Color): Color

Combines this with another color by subtracting each RGB value. Values are clamped on underflow.

Combines this with another color by subtracting each RGB value. Values are clamped on underflow.

The alpha of the left-side argument is kept.

Attributes

inline def a: Int

The alpha channel value.

The alpha channel value.

Attributes

inline def abgr: Int

This color packed as a 32 bit integer in ABGR.

This color packed as a 32 bit integer in ABGR.

Attributes

inline def argb: Int

this color packed as a 32 bit integer in ARGB.

this color packed as a 32 bit integer in ARGB.

Attributes

inline def b: Int

The green channel value.

The green channel value.

Attributes

def copy(r: Int, g: Int, b: Int, a: Int): Color
inline def g: Int

The green channel value.

The green channel value.

Attributes

def invert: Color

Inverts this color by inverting every RGB channel.

Inverts this color by inverting every RGB channel.

The alpha is preserved

Attributes

Multiplies all channels by the alpha.

Multiplies all channels by the alpha.

Attributes

inline def r: Int

The red channel value.

The red channel value.

Attributes

inline def rgb: Int

This color packed as a 24 bit integer in RGB (with the first byte set to 0).

This color packed as a 24 bit integer in RGB (with the first byte set to 0).

Attributes