setColor method

bool setColor(
  1. SdlxColor color
)

Set the color of a text object.

The default text color is white (255, 255, 255, 255).

\param text the TTF_Text to modify. \param r the red color value in the range of 0-255. \param g the green color value in the range of 0-255. \param b the blue color value in the range of 0-255. \param a the alpha value in the range of 0-255. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should be called on the thread that created the text.

\since This function is available since SDL_ttf 3.0.0.

\sa TTF_GetTextColor \sa TTF_SetTextColorFloat

extern SDL_DECLSPEC bool SDLCALL TTF_SetTextColor(TTF_Text *text, Uint8 r, Uint8 g, Uint8 b, Uint8 a)

Implementation

bool setColor(SdlxColor color) => ttfxSetTextColor(this, color);