3838#include < DHTesp.h>
3939#include < DFPlayerMini_Fast.h>
4040#include < SoftwareSerial.h>
41- #include " ColorConverterLib.h"
4241#include < TimeLib.h>
4342#include < ArduinoJson.h>
4443#include < ArduinoHttpClient.h>
@@ -506,11 +505,7 @@ void SaveConfig()
506505 json[" matrixTempCorrection" ] = matrixTempCorrection;
507506 json[" ntpServer" ] = ntpServer;
508507 json[" clockTimeZone" ] = clockTimeZone;
509-
510- String clockColorHex;
511- ColorConverter::RgbToHex (clockColorR, clockColorG, clockColorB, clockColorHex);
512- json[" clockColor" ] = " #" + clockColorHex;
513-
508+ json[" clockColor" ] = " #" + RGBtoHEX (clockColorR, clockColorG, clockColorB);
514509 json[" clockSwitchAktiv" ] = clockSwitchAktiv;
515510 json[" clockSwitchSec" ] = clockSwitchSec;
516511 json[" clock24Hours" ] = clock24Hours;
@@ -692,7 +687,7 @@ void SetConfigVariables(JsonObject &json)
692687
693688 if (json.containsKey (" clockColor" ))
694689 {
695- ColorConverter::HexToRgb (json[" clockColor" ].as <String>(), clockColorR, clockColorG, clockColorB);
690+ HEXtoRGB (json[" clockColor" ].as <String>(), clockColorR, clockColorG, clockColorB);
696691 }
697692
698693 if (json.containsKey (" clockSwitchAktiv" ))
@@ -1545,7 +1540,7 @@ void CreateFrames(JsonObject &json, int forceDuration)
15451540 uint8_t b = 255 ;
15461541 if (json[" switchAnimation" ][" hexColor" ].as <char *>() != NULL )
15471542 {
1548- ColorConverter::HexToRgb (json[" switchAnimation" ][" hexColor" ].as <char *>(), r, g, b);
1543+ HEXtoRGB (json[" switchAnimation" ][" hexColor" ].as <char *>(), r, g, b);
15491544 }
15501545 else if (json[" switchAnimation" ][" color" ][" r" ].as <char *>() != NULL )
15511546 {
@@ -1628,7 +1623,7 @@ void CreateFrames(JsonObject &json, int forceDuration)
16281623 else if (json[" clock" ][" hexColor" ].as <char *>() != NULL )
16291624 {
16301625 logMessage += F (" hexColor, " );
1631- ColorConverter::HexToRgb (json[" clock" ][" hexColor" ].as <char *>(), clockColorR, clockColorG, clockColorB);
1626+ HEXtoRGB (json[" clock" ][" hexColor" ].as <char *>(), clockColorR, clockColorG, clockColorB);
16321627 }
16331628 if (logMessage.endsWith (" , " ))
16341629 {
@@ -1651,7 +1646,7 @@ void CreateFrames(JsonObject &json, int forceDuration)
16511646 uint8_t r, g, b;
16521647 if (json[" bar" ][" hexColor" ].as <char *>() != NULL )
16531648 {
1654- ColorConverter::HexToRgb (json[" bar" ][" hexColor" ].as <char *>(), r, g, b);
1649+ HEXtoRGB (json[" bar" ][" hexColor" ].as <char *>(), r, g, b);
16551650 }
16561651 else
16571652 {
@@ -1671,7 +1666,7 @@ void CreateFrames(JsonObject &json, int forceDuration)
16711666 uint8_t r, g, b;
16721667 if (x[" hexColor" ].as <char *>() != NULL )
16731668 {
1674- ColorConverter::HexToRgb (x[" hexColor" ].as <char *>(), r, g, b);
1669+ HEXtoRGB (x[" hexColor" ].as <char *>(), r, g, b);
16751670 }
16761671 else
16771672 {
@@ -1797,7 +1792,7 @@ void CreateFrames(JsonObject &json, int forceDuration)
17971792 uint8_t r, g, b;
17981793 if (json[" text" ][" hexColor" ].as <char *>() != NULL )
17991794 {
1800- ColorConverter::HexToRgb (json[" text" ][" hexColor" ].as <char *>(), r, g, b);
1795+ HEXtoRGB (json[" text" ][" hexColor" ].as <char *>(), r, g, b);
18011796 }
18021797 else
18031798 {
0 commit comments