diff --git a/src/internal/RgbColor.cpp b/src/internal/RgbColor.cpp index c2692ed..99f4e94 100644 --- a/src/internal/RgbColor.cpp +++ b/src/internal/RgbColor.cpp @@ -30,6 +30,14 @@ License along with NeoPixel. If not, see #include "HslColor.h" #include "HsbColor.h" #include "HtmlColor.h" +#include "RgbwColor.h" + +RgbColor::RgbColor(const RgbwColor& color) : + R(color.R), + G(color.G), + B(color.B) +{ +}; RgbColor::RgbColor(const Rgb16Color& color) { diff --git a/src/internal/RgbColor.h b/src/internal/RgbColor.h index cdbcf22..aa999f5 100644 --- a/src/internal/RgbColor.h +++ b/src/internal/RgbColor.h @@ -29,6 +29,7 @@ License along with NeoPixel. If not, see #include "NeoSettings.h" #include "RgbColorBase.h" +struct RgbwColor; // ------------------------------------------------------------------------ // RgbColor represents a color object that is represented by Red, Green, Blue @@ -57,6 +58,11 @@ struct RgbColor : RgbColorBase { }; + // ------------------------------------------------------------------------ + // explicitly Construct a RgbColor using RgbwColor + // ------------------------------------------------------------------------ + explicit RgbColor(const RgbwColor& color); + // ------------------------------------------------------------------------ // Construct a RgbColor using Rgb16Color // ------------------------------------------------------------------------