summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/theming/lib/IconBuilder.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/theming/lib/IconBuilder.php b/apps/theming/lib/IconBuilder.php
index 5d1c58e93f2..d0e26e110fc 100644
--- a/apps/theming/lib/IconBuilder.php
+++ b/apps/theming/lib/IconBuilder.php
@@ -145,6 +145,17 @@ class IconBuilder {
$appIconFile->setResolution($resX, $resY);
$appIconFile->setBackgroundColor(new ImagickPixel('transparent'));
$appIconFile->readImageBlob($svg);
+
+ /**
+ * invert app icons for bright primary colors
+ * the default nextcloud logo will not be inverted to black
+ */
+ if ($this->util->invertTextColor($color)
+ && !$appIcon instanceof ISimpleFile
+ && $app !== "core"
+ ) {
+ $appIconFile->negateImage(false);
+ }
$appIconFile->scaleImage(512, 512, true);
} else {
$appIconFile = new Imagick();