Color

gdext.builtin.Color
See theColor companion object
final case class Color(r: Float, g: Float, b: Float, a: Float = ...)

Godot's Color: RGBA as single-precision floats (16 bytes), usually in 0..1. The named colors (Color.RED, Color.ALICE_BLUE, ...) come from the engine's API dump; see ColorNames.

Attributes

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

Members list

Value members

Concrete methods

def *(o: Color): Color
def *(s: Float): Color
def +(o: Color): Color
def -(o: Color): Color
def /(o: Color): Color
def /(s: Float): Color
def a8: Long
def b8: Long
def blend(over: Color): Color
def clamp(min: Color = ..., max: Color = ...): Color
def darkened(amount: Float): Color
def g8: Long
def getLuminance: Float
def h: Float

HSV hue, 0..1.

HSV hue, 0..1.

Attributes

def isEqualApprox(to: Color): Boolean
def lerp(to: Color, weight: Float): Color
def lightened(amount: Float): Color
def okHslH: Float
def okHslL: Float
def okHslS: Float
def r8: Long
def s: Float

HSV saturation.

HSV saturation.

Attributes

def toAbgr32: Long
def toAbgr64: Long
def toArgb32: Long
def toArgb64: Long
def toHtml(withAlpha: Boolean = ...): String
def toRgba32: Long
def toRgba64: Long
def unary_+: Color
def unary_-: Color

Like GDScript -color: every channel, alpha included, becomes 1 - c.

Like GDScript -color: every channel, alpha included, becomes 1 - c.

Attributes

def v: Float

HSV value.

HSV value.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product