Use snprintf instead of std::stringstream when converting color values to strings