MCPcopy Create free account
hub / github.com/cathery/sys-con / DecodeColorValue

Function DecodeColorValue

source/Sysmodule/source/config_handler.cpp:68–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 }
67
68 RGBAColor DecodeColorValue(const char *value)
69 {
70 RGBAColor color{255};
71 uint8_t counter = 0;
72 int charIndex = 0;
73 while (value[charIndex] != '\0')
74 {
75 if (charIndex == 0)
76 color.values[counter++] = atoi(value + charIndex++);
77 if (value[charIndex++] == ',')
78 {
79 color.values[counter++] = atoi(value + charIndex);
80 if (counter == 4)
81 break;
82 }
83 }
84 return color;
85 }
86
87 int ParseConfigLine(void *dummy, const char *section, const char *name, const char *value)
88 {

Callers 1

ParseConfigLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected