diff --git a/csscolorparser.cpp b/csscolorparser.cpp index 5658f2b..43b81da 100644 --- a/csscolorparser.cpp +++ b/csscolorparser.cpp @@ -110,6 +110,8 @@ const NamedColor namedColors[] = { { "yellow", { 255, 255, 0, 1 } }, { "yellowgreen", { 154, 205, 50, 1 } } }; +const size_t namedColorCount = sizeof (namedColors) / sizeof (NamedColor); + template uint8_t clamp_css_byte(T i) { // Clamp to integer 0 .. 255. i = ::round(i); // Seems to be what Chrome does (vs truncation).