struct SDL::Color

Defined in:

color.cr

Constructors

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(r, g, b, a = 255_u8) #

[View source]

Instance Method Detail

def a #

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

[View source]
def b #

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

[View source]
def g #

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

[View source]
def r #

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

[View source]

Macro Detail

macro [](r, g, b, a = 255) #

Creates a RGB(A) Color. For example Color[0, 0, 0] is opaque black, whereas Color[255, 0, 0, 128] is half transparent red.


[View source]
macro [](rgb, a = 255) #

Creates a Color of a single intensity. For example Color[255] is white and equivalent to Color[255, 255, 255].


[View source]