TLIGHT_PRODUCTS / WS281X
Revision:
27:bc79f444883b
Parent:
16:01e073c662d7
Child:
29:a362df191524
diff -r 7860372ae448 -r bc79f444883b ColorLib.h
--- a/ColorLib.h	Sun Sep 04 19:00:24 2016 +0000
+++ b/ColorLib.h	Tue Sep 06 22:12:59 2016 +0000
@@ -131,13 +131,18 @@
         blue  = (b < 0) ? 0 : ((RGB_MAX_VAL < b) ? RGB_MAX_VAL : b);
     }
 
-    RGBColor(int rgb)
+    RGBColor(const int rgb)
     {
         red   = GetRValue(rgb);
         green = GetGValue(rgb);
         blue  = GetBValue(rgb);
     }
 
+    RGBColor(const HSVColor& hsv)
+    {
+        hsv2rgb(hsv, *this);
+    }
+
     RGBColor(HSVColor& hsv)
     {
         hsv2rgb(hsv, *this);
@@ -245,12 +250,17 @@
         val = v;
     }
 
+    HSVColor(const RGBColor& rgb)
+    {
+        rgb2hsv(rgb, *this);
+    }
+
     HSVColor(RGBColor& rgb)
     {
         rgb2hsv(rgb, *this);
     }
 
-    HSVColor(int rgbcolor)
+    HSVColor(const int rgbcolor)
     {
         RGBColor rgb(rgbcolor);
         rgb2hsv(rgb, *this);