struct DotPrison::Colour

Defined in:

dot_prison/colour.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

to_prison to_prison

Constructor Detail

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

Create by specifying the red, green, blue, and optionally alpha values


[View source]

Class Method Detail

def self.parse(str : String) : self | Nil #

Create from the stored value, or nil on invalid values


[View source]

Instance Method Detail

def a : UInt8 #

Alpha value 0..255


[View source]
def b : UInt8 #

Blue value 0..255


[View source]
def g : UInt8 #

Green value 0..255


[View source]
def r : UInt8 #

Red value 0..255


[View source]
def to_s(io : IO) #
Description copied from struct Struct

Same as #inspect(io).


[View source]