class Sixteen::Color

Defined in:

color.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]
def self.new(ctx, value) #

[View source]
def self.new(hex : String) #

[View source]
def self.new(*, h, s, l) #

[View source]

Instance Method Detail

def b : UInt8 #

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

[View source]
def colorize : Colorize::ColorRGB #
Description copied from module Colorize::ObjectExtensions

Turns self into a Colorize::Object.


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

[View source]
def dark? #

[View source]
def darker(amount : Float64 = 0.1) #

[View source]
def g : UInt8 #

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

[View source]
def hex : String #

[View source]
def hex_bgr : String #

[View source]
def hsl #

[View source]
def hue2rgb(p, q, t) #

[View source]
def light? #

[View source]
def lighter(amount : Float64 = 0.1) #

[View source]
def r : UInt8 #

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

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]