logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TTF_SetTextColor - Set the color of a text object.

Availability

       This function is available since SDL_ttf 3.0.0.

Description

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

Function Parameters

text   the TTF_Text
               to modify.

       r      the red color value in the range of 0-255.

       g      the green color value in the range of 0-255.

       b      the blue color value in the range of 0-255.

       a      the alpha value in the range of 0-255.

Header File

       Defined in SDL3_ttf/SDL_ttf.h

Name

       TTF_SetTextColor - Set the color of a text object.

Return Value

       Returns true on success or false on failure; call SDL_GetError() for more information.

See Also

(3), TTF_GetTextColor(3), (3), TTF_SetTextColorFloat(3)

SDL_ttf                                           SDL_ttf 3.2.2                              TTF_SetTextColor(3)

Synopsis

#include"SDL3_ttf/SDL_ttf.h"boolTTF_SetTextColor(TTF_Text*text,Uint8r,Uint8g,Uint8b,Uint8a);

Thread Safety

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

return

See Also