struct PF::Pixel

Defined in:

colors.cr
pixel.cr

Constant Summary

AliceBlue = Pixel.new(4042850303_u32)
AntiqueWhite = Pixel.new(4209760255_u32)
Aqua = Pixel.new(16777215_u32)
Aquamarine = Pixel.new(2147472639_u32)
Azure = Pixel.new(4043309055_u32)
Beige = Pixel.new(4126530815_u32)
Bisque = Pixel.new(4293182719_u32)
Black = Pixel.new(255_u32)
BlanchedAlmond = Pixel.new(4293643775_u32)
Blue = Pixel.new(65535_u32)
BlueViolet = Pixel.new(2318131967_u32)
Brown = Pixel.new(2771004159_u32)
BurlyWood = Pixel.new(3736635391_u32)
CadetBlue = Pixel.new(1604231423_u32)
Chartreuse = Pixel.new(2147418367_u32)
Chocolate = Pixel.new(3530104575_u32)
Coral = Pixel.new(4286533887_u32)
CornflowerBlue = Pixel.new(1687547391_u32)
Cornsilk = Pixel.new(4294499583_u32)
Crimson = Pixel.new(3692313855_u32)
Cyan = Pixel.new(16777215_u32)
DarkBlue = Pixel.new(35839_u32)
DarkCyan = Pixel.new(9145343_u32)
DarkGoldenRod = Pixel.new(3095792639_u32)
DarkGray = Pixel.new(2846468607_u32)
DarkGreen = Pixel.new(6553855_u32)
DarkGrey = Pixel.new(2846468607_u32)
DarkKhaki = Pixel.new(3182914559_u32)
DarkMagenta = Pixel.new(2332068863_u32)
DarkOliveGreen = Pixel.new(1433087999_u32)
Darkorange = Pixel.new(4287365375_u32)
DarkOrchid = Pixel.new(2570243327_u32)
DarkRed = Pixel.new(2332033279_u32)
DarkSalmon = Pixel.new(3918953215_u32)
DarkSeaGreen = Pixel.new(2411499519_u32)
DarkSlateBlue = Pixel.new(1211993087_u32)
DarkSlateGray = Pixel.new(793726975_u32)
DarkSlateGrey = Pixel.new(793726975_u32)
DarkTurquoise = Pixel.new(13554175_u32)
DarkViolet = Pixel.new(2483082239_u32)
DeepPink = Pixel.new(4279538687_u32)
DeepSkyBlue = Pixel.new(12582911_u32)
DimGray = Pixel.new(1768516095_u32)
DimGrey = Pixel.new(1768516095_u32)
DodgerBlue = Pixel.new(512819199_u32)
FireBrick = Pixel.new(2988581631_u32)
FloralWhite = Pixel.new(4294635775_u32)
ForestGreen = Pixel.new(579543807_u32)
Fuchsia = Pixel.new(4278255615_u32)
Gainsboro = Pixel.new(3705462015_u32)
GhostWhite = Pixel.new(4177068031_u32)
Gold = Pixel.new(4292280575_u32)
GoldenRod = Pixel.new(3668254975_u32)
Gray = Pixel.new(2155905279_u32)
Green = Pixel.new(8388863_u32)
GreenYellow = Pixel.new(2919182335_u32)
Grey = Pixel.new(2155905279_u32)
HoneyDew = Pixel.new(4043305215_u32)
HotPink = Pixel.new(4285117695_u32)
IndianRed = Pixel.new(3445382399_u32)
Indigo = Pixel.new(1258324735_u32)
Ivory = Pixel.new(4294963455_u32)
Khaki = Pixel.new(4041641215_u32)
Lavender = Pixel.new(3873897215_u32)
LavenderBlush = Pixel.new(4293981695_u32)
LawnGreen = Pixel.new(2096890111_u32)
LemonChiffon = Pixel.new(4294626815_u32)
LightBlue = Pixel.new(2916673279_u32)
LightCoral = Pixel.new(4034953471_u32)
LightCyan = Pixel.new(3774873599_u32)
LightGoldenRodYellow = Pixel.new(4210742015_u32)
LightGray = Pixel.new(3553874943_u32)
LightGreen = Pixel.new(2431553791_u32)
LightGrey = Pixel.new(3553874943_u32)
LightPink = Pixel.new(4290167295_u32)
LightSalmon = Pixel.new(4288707327_u32)
LightSeaGreen = Pixel.new(548580095_u32)
LightSkyBlue = Pixel.new(2278488831_u32)
LightSlateGray = Pixel.new(2005441023_u32)
LightSlateGrey = Pixel.new(2005441023_u32)
LightSteelBlue = Pixel.new(2965692159_u32)
LightYellow = Pixel.new(4294959359_u32)
Lime = Pixel.new(16711935_u32)
LimeGreen = Pixel.new(852308735_u32)
Linen = Pixel.new(4210091775_u32)
Magenta = Pixel.new(4278255615_u32)
Maroon = Pixel.new(2147483903_u32)
MediumAquaMarine = Pixel.new(1724754687_u32)
MediumBlue = Pixel.new(52735_u32)
MediumOrchid = Pixel.new(3126187007_u32)
MediumPurple = Pixel.new(2473646335_u32)
MediumSeaGreen = Pixel.new(1018393087_u32)
MediumSlateBlue = Pixel.new(2070474495_u32)
MediumSpringGreen = Pixel.new(16423679_u32)
MediumTurquoise = Pixel.new(1221709055_u32)
MediumVioletRed = Pixel.new(3340076543_u32)
MidnightBlue = Pixel.new(421097727_u32)
MintCream = Pixel.new(4127193855_u32)
MistyRose = Pixel.new(4293190143_u32)
Moccasin = Pixel.new(4293178879_u32)
NavajoWhite = Pixel.new(4292783615_u32)
Navy = Pixel.new(33023_u32)
OldLace = Pixel.new(4260751103_u32)
Olive = Pixel.new(2155872511_u32)
OliveDrab = Pixel.new(1804477439_u32)
Orange = Pixel.new(4289003775_u32)
OrangeRed = Pixel.new(4282712319_u32)
Orchid = Pixel.new(3664828159_u32)
PaleGoldenRod = Pixel.new(4008225535_u32)
PaleGreen = Pixel.new(2566625535_u32)
PaleTurquoise = Pixel.new(2951671551_u32)
PaleVioletRed = Pixel.new(3631256575_u32)
PapayaWhip = Pixel.new(4293907967_u32)
PeachPuff = Pixel.new(4292524543_u32)
Peru = Pixel.new(3448061951_u32)
Pink = Pixel.new(4290825215_u32)
Plum = Pixel.new(3718307327_u32)
PowderBlue = Pixel.new(2967529215_u32)
Purple = Pixel.new(2147516671_u32)
Red = Pixel.new(4278190335_u32)
RosyBrown = Pixel.new(3163525119_u32)
RoyalBlue = Pixel.new(1097458175_u32)
SaddleBrown = Pixel.new(2336560127_u32)
Salmon = Pixel.new(4202722047_u32)
SandyBrown = Pixel.new(4104413439_u32)
SeaGreen = Pixel.new(780883967_u32)
SeaShell = Pixel.new(4294307583_u32)
Sienna = Pixel.new(2689740287_u32)
Silver = Pixel.new(3233857791_u32)
SkyBlue = Pixel.new(2278484991_u32)
SlateBlue = Pixel.new(1784335871_u32)
SlateGray = Pixel.new(1887473919_u32)
SlateGrey = Pixel.new(1887473919_u32)
Snow = Pixel.new(4294638335_u32)
SpringGreen = Pixel.new(16744447_u32)
SteelBlue = Pixel.new(1182971135_u32)
Tan = Pixel.new(3535047935_u32)
Teal = Pixel.new(8421631_u32)
Thistle = Pixel.new(3636451583_u32)
Tomato = Pixel.new(4284696575_u32)
Turquoise = Pixel.new(1088475391_u32)
Violet = Pixel.new(4001558271_u32)
Wheat = Pixel.new(4125012991_u32)
White = Pixel.new(4294967295_u32)
WhiteSmoke = Pixel.new(4126537215_u32)
Yellow = Pixel.new(4294902015_u32)
YellowGreen = Pixel.new(2597139199_u32)

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(rgba : UInt32) #

[View source]
def self.new(r : UInt8 = 255, g : UInt8 = 255, b : UInt8 = 255, a : UInt8 = 255) #

[View source]

Class Method Detail

def self.random #

[View source]

Instance Method Detail

def *(n : Float64) #

[View source]
def +(n : Float64) #

[View source]
def -(n : Float64) #

[View source]
def /(n : Float64) #

[View source]
def a : UInt8 #

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

[View source]
def add(other : Pixel) #

[View source]
def b : UInt8 #

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

[View source]
def blend(other : Pixel, t : Float64 = 0.5) #

[View source]
def blend_value(v1 : UInt8, v2 : UInt8, t : Float64) : UInt8 #

[View source]
def darken(other : Pixel) #

[View source]
def format(format) #

[View source]
def g : UInt8 #

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

[View source]
def r : UInt8 #

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

[View source]
def to_u #

[View source]
def to_u32 #

[View source]