struct

Blend2D::Styling::RGBA32

Inherits Struct < Value < Object

Constants

BLACK = RGBA32.new(255, 255, 255, 255)
BLUE = RGBA32.new(0, 0, 255, 255)
GREEN = RGBA32.new(0, 255, 0, 255)
RED = RGBA32.new(255, 0, 0, 255)
WHITE = RGBA32.new(255, 255, 255, 255)

Constructors

new(r : UInt8, g : UInt8, b : UInt8, a : UInt8)

Initialize the color with four 8-bit unsigned integers representing red, green, blue, and alpha.

Source
new(packed : UInt32)

Initialize the color with a 32-bit unsigned integer representing red, green, blue, and alpha.

Source

Instance methods

opaque

Initialize the color with full alpha.

Source
raw

Pack the integers into a 32-bit unsigned integer.

Source
to_rgba64

Convert the RGBA32 to an RGBA64 by upscaling each integer to 16 bits.

Source
transparent

Initialize the color with zero alpha.

Source
with_alpha(alpha : UInt8)

Initialize the color with the same red, green, and blue values, but with the specified alpha value.

Source