Constructor for PixelRGB

I’m trying to write some templated image processing functions, that take either an PixelARGB or a PixelRGB. So far it’s going well, except PixelRGB doesn’t have a constructor that take colour components. Could it get something like:

    PixelARGB (const uint8, const uint8 r, const uint8 g, const uint8 b) noexcept
        components.b = b;
        components.g = g;
        components.r = r;

They both do have void setARGB (const uint8 a, const uint8 r, const uint8 g, const uint8 b) noexcept

The method presents an unambiguous interface though:

PixelRGB::setARGB (uint8, uint8, uint8, uint8) - it’s clear from the method name what the arguments should be.
PixelRGB::PixelRGB (uint8, uint8, uint8, uint8) - not at all obvious what to do here.

I can see why having a unified format for the constructor would be helpful in your case, but without lots more support for the idea I don’t think it justifies the extra complexity.

What about something like:

template <class T>
T makePixelFromARGB (uint8 a, uint8 r, uint8 g, uint8 b)
    T p;
    p.setARGB (a, r, g, b);
    return p;

That’s easy enough to have as a free function in your own code.

Or you could do it with a lambda, if you want to keep things more localised.