The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

TCOD::ColorRGBA - A representation of a color with an alpha channel

DESCRIPTION

This represents a four-channel color.

METHODS

new

    $color = TCOD::ColorRGBA->new( $r, $g, $b, $a );

Construct a new TCOD::ColorRGBA object. Takes the red, green, blue, and alpha components as positional parameters, as integers between 0 and 255.

r

    $red = $color->r;

The red component of this color, as an integer between 0 and 255.

g

    $green = $color->g;

The green component of this color, as an integer between 0 and 255.

b

    $blue = $color->b;

The blue component of this color, as an integer between 0 and 255.

a

    $alpha = $color->a;

The alpha component of this color, as an integer between 0 and 255.

SEE ALSO

TCOD
TCOD::Color
TCOD::Console

COPYRIGHT AND LICENSE

Copyright 2021 José Joaquín Atria

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.