xieite ::term ::fg_code ()
Defined in header <xieite/io/term.hpp>
Returns a
std ::string
which changes the foreground color of text when printed.Declaration
#0[[nodiscard ]]static constexpr std ::string fg_code (std ::uint8_t r ,std ::uint8_t g ,std ::uint8_t b )noexcept ;
#1
[[nodiscard ]]static constexpr std ::string fg_code (const xieite ::color3 & color )noexcept ;
Example
Possible output:int main () {std ::println (" ,{} Hello, world!"xieite ::term ::fg_code (255 ,0 ,0 )); }
Hello, world!
[View in Compiler Explorer]