diff --git a/src/modules/core/Color.cpp b/src/modules/core/Color.cpp index 750772ac9..3c11264c0 100644 --- a/src/modules/core/Color.cpp +++ b/src/modules/core/Color.cpp @@ -163,7 +163,7 @@ core::String Color::toHex(const RGBA rgba, bool hashPrefix) { if (hashPrefix) { hex.append("#"); } - hex.append(core::string::format("%x%x%x%x", rgba.r, rgba.g, rgba.b, rgba.a)); + hex.append(core::string::format("%02x%02x%02x%02x", rgba.r, rgba.g, rgba.b, rgba.a)); return hex; }