struct Godot::Color

Overview

A color represented in RGBA format with 32-bit floating point precision per channel.

Defined in:

libgodot/types.cr

Constant Summary

BLACK = Color.new(0.0_f32, 0.0_f32, 0.0_f32, 1.0_f32)
BLUE = Color.new(0.0_f32, 0.0_f32, 1.0_f32, 1.0_f32)
GREEN = Color.new(0.0_f32, 1.0_f32, 0.0_f32, 1.0_f32)
RED = Color.new(1.0_f32, 0.0_f32, 0.0_f32, 1.0_f32)
WHITE = Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32)

Constructors

Instance Method Summary

Constructor Detail

def self.new(r : Float32 = 1.0_f32, g : Float32 = 1.0_f32, b : Float32 = 1.0_f32, a : Float32 = 1.0_f32) #

[View source]
def self.new(r : Number, g : Number, b : Number, a : Number = 1.0) #

[View source]
def self.new(pointer : Pointer(Void)) #

[View source]

Instance Method Detail

def a : Float32 #

[View source]
def a=(a : Float32) #

[View source]
def b : Float32 #

[View source]
def b=(b : Float32) #

[View source]
def g : Float32 #

[View source]
def g=(g : Float32) #

[View source]
def r : Float32 #

[View source]
def r=(r : Float32) #

[View source]