TTF_GetTextColorFloat(3)
π TTF_GetTextColorFloat(3) π
okay bestie, welcome to the SDL_ttf3 functions corner of the SDL_ttf manual β this one's about peeking at what color a text object is rocking. no cap.
πΈ NAME πΈ
TTF_GetTextColorFloat β get the color of a text object. that's it, that's the whole job β¨
π HEADER FILE π
defined in SDL3_ttf/SDL_ttf.h β yeah she lives there, go say hi π«Ά
β¨ SYNOPSIS β¨
#include "SDL3_ttf/SDL_ttf.h"
bool TTF_GetTextColorFloat(TTF_Text *text, float *r, float *g, float *b, float *a);
π¦ FUNCTION PARAMETERS π¦
textβ theTTF_Textto query. the main character, literally. πrβ a pointer that gets filled in with the red color value, normally in the range of0-1, and it may beNULL. πgβ a pointer that gets filled in with the green color value, normally in the range of0-1, and it may beNULL. πΏbβ a pointer that gets filled in with the blue color value, normally in the range of0-1, and it may beNULL. πaβ a pointer that gets filled in with the alpha value in the range of0-1, and it may beNULL. π
π RETURN VALUE π
returns true on success or false on failure β and if it fails, bestie, call SDL_GetError() for more information. the error message is giving what you need to know, fr fr.
π§΅ THREAD SAFETY π§΅
this function should be called on the thread that created the text. no wandering off to another thread, she's loyal like that. π
β AVAILABILITY β
this function is available since SDL_ttf 3.0.0. been iconic for a minute.
π SEE ALSO π
β’(3)TTF_GetTextColor(3)β’(3)TTF_SetTextColorFloat(3)
and that's the whole page, periodt. π brought to you by SDL_ttf, version SDL_ttf 3.2.2 β no date on this one so we're just gonna vibe with the version, mwah ππ
π¦ where this page comes from
- debian trixie: libsdl3-ttf-doc 3.2.2+ds-1 Β· Zlib
- fedora 43: SDL3_ttf-devel 3.2.2-2.fc43 Β· Zlib AND MIT
- fedora 43: SDL3_ttf-devel 3.2.2-2.fc43 Β· Zlib AND MIT
- fedora 44: SDL3_ttf-devel 3.2.2-4.fc44 Β· Zlib AND MIT
- fedora 44: SDL3_ttf-devel 3.2.2-4.fc44 Β· Zlib AND MIT
- ubuntu questing: libsdl3-ttf-doc 3.2.2+ds-1
- ubuntu resolute: libsdl3-ttf-doc 3.2.2+ds-1build1 Β· Zlib
- ubuntu stonking: libsdl3-ttf-doc 3.2.2+ds-2 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms