class Nya::Color

Included Modules

Defined in:

nya/color.cr

Constant Summary

NYA_REGISTERED = true
PROPERTIES = {"r" => "UInt8", "g" => "UInt8", "b" => "UInt8", "a" => "UInt8", "name" => "$String"} of String => String

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(r : UInt8, g : UInt8, b : UInt8, a : UInt8) #

[View source]
def self.new #

[View source]

Class Method Detail

def self.black #

[View source]
def self.deserialize(xml, ctx : SerializationContext | Nil = nil) #

[View source]
def self.red #

[View source]
def self.transform_name(name) #

def self.white #

[View source]
def self.xml_name #

Returns XML compatible name of a type (see Nya::Serializable.translate_type)


Instance Method Detail

def !=(other : self) #

[View source]
def +(other : Color) #

[View source]
def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


[View source]
def a : UInt8 #

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

[View source]
def b : UInt8 #

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

[View source]
def g : UInt8 #

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

[View source]
def name #

Completely useless method. Used for serialization purposes Returns empty string


[View source]
def name=(n : String) #

[View source]
def r : UInt8 #

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

[View source]
def to_gl #

[View source]
def to_gl4 #

[View source]

Macro Detail

macro predef(name, r, g, b) #

[View source]