module PNGUtil::RGBA

Overview

A RGBA is made up of four components: red, green, blue and alpha, each with a resolution of 16 bit.

All 148 Named CSS Colors are available as constants.

Defined in:

png_util/rgba.cr

Constant Summary

DEFAULT = {r: 0_u16, g: 0_u16, b: 0_u16, a: 0_u16}

Constructors

Class Method Summary

Constructor Detail

def self.new(r : UInt16, g : UInt16, b : UInt16, a : UInt16 = UInt16::MAX) : Data #

[View source]
def self.new(color : UInt16, a : UInt16 = UInt16::MAX) : Data #

[View source]

Class Method Detail

def self.from_rgb_n(values, n) : Data #

Create a RGBA struct from a tuple of n-bit red, green and blue values


[View source]