struct Crono::Color

Defined in:

crono/color.cr

Constant Summary

BLACK = SDL::Color[0]
BLUE = SDL::Color[0, 0, 255]
CYAN = SDL::Color[0, 255, 255]
DODGER = SDL::Color[0, 171, 255]
GRAY = SDL::Color[128]
GREEN = SDL::Color[0, 255, 0]
LIME = SDL::Color[171, 255, 0]
MAGENTA = SDL::Color[255, 0, 255]
ORANGE = SDL::Color[255, 171, 0]
PINK = SDL::Color[255, 0, 171]
PURPLE = SDL::Color[171, 0, 171]
RED = SDL::Color[255, 0, 0]
SPRING = SDL::Color[0, 255, 171]
WHITE = SDL::Color[255]

R, G, B, A

YELLOW = SDL::Color[255, 255, 0]

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.darken(values : RGBA, percent : Int32) #

Returns RGBA with all non-zero values lowered by percent. Does not change transparency


[View source]
def self.lighten(values : RGBA, percent : Int32) #

[View source]
def self.rand #

[View source]
def self.to_hex(values : RGB) #

[View source]
def self.to_hex(values : RGBA) #

[View source]

Instance Method Detail

def initialize #

[View source]

Macro Detail

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

[View source]