Skip to content
Snippets Groups Projects
Commit 9d6bf5f3 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add `with_alpha()` to simox::Color

parent c55fae1f
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,14 @@ namespace simox::color
Eigen::Vector4f to_vector4f() const;
/// Return a copy of this with the given alpha.
template <typename IntOrFloat>
Color with_alpha(IntOrFloat a) const
{
return Color(r, g, b, to_byte(a));
}
// Named colors.
// Colorless
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment