Skip to content

Class endstone::Color

ClassList > endstone > Color

Represents a color with red, green, blue, and alpha components.

  • #include <endstone/util/color.h>

Public Functions

Type Name
Color (const std::uint8_t red=0, const std::uint8_t green=0, const std::uint8_t blue=0, const std::uint8_t alpha=255)
Creates a color with the specified red, green, blue, and alpha values in the range (0 - 255).
std::uint8_t getAlpha () const
Gets the alpha component of the color.
std::uint8_t getBlue () const
Gets the blue component of the color.
std::uint8_t getGreen () const
Gets the green component of the color.
std::uint8_t getRed () const
Gets the red component of the color.

Public Functions Documentation

function Color

Creates a color with the specified red, green, blue, and alpha values in the range (0 - 255).

inline explicit endstone::Color::Color (
    const std::uint8_t red=0,
    const std::uint8_t green=0,
    const std::uint8_t blue=0,
    const std::uint8_t alpha=255
) 

Parameters:

  • red Red component (0–255)
  • green Green component (0–255)
  • blue Blue component (0–255)
  • alpha Alpha component (0–255, default 255 = opaque)

function getAlpha

Gets the alpha component of the color.

inline std::uint8_t endstone::Color::getAlpha () const

Returns:

The alpha component (0–255) of the color.


function getBlue

Gets the blue component of the color.

inline std::uint8_t endstone::Color::getBlue () const

Returns:

The blue component (0–255) of the color.


function getGreen

Gets the green component of the color.

inline std::uint8_t endstone::Color::getGreen () const

Returns:

The green component (0–255) of the color.


function getRed

Gets the red component of the color.

inline std::uint8_t endstone::Color::getRed () const

Returns:

The red component (0–255) of the color.



The documentation for this class was generated from the following file include/endstone/util/color.h