Skip to content

function to_name(Color) demo

inline constexpr std::string_view to_name(Color color) noexcept { … }

Converts a Color enum to its string representation.

Parameters
color The Color enum value.
Returns
A string view representing the color name.
Red For Color::Red.
Green For Color::Green.
Blue For Color::Blue.
Unknown For any invalid value.

Defined at library.hpp:93