summaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/Capabilities.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php
index 2552d15ea81..d94a65f21c1 100644
--- a/apps/theming/lib/Capabilities.php
+++ b/apps/theming/lib/Capabilities.php
@@ -37,6 +37,9 @@ class Capabilities implements IPublicCapability {
/** @var ThemingDefaults */
protected $theming;
+ /** @var Util */
+ protected $util;
+
/** @var IURLGenerator */
protected $url;
@@ -45,11 +48,13 @@ class Capabilities implements IPublicCapability {
/**
* @param ThemingDefaults $theming
+ * @param Util $util
* @param IURLGenerator $url
* @param IConfig $config
*/
- public function __construct(ThemingDefaults $theming, IURLGenerator $url, IConfig $config) {
+ public function __construct(ThemingDefaults $theming, Util $util, IURLGenerator $url, IConfig $config) {
$this->theming = $theming;
+ $this->util = $util;
$this->url = $url;
$this->config = $config;
}
@@ -68,6 +73,7 @@ class Capabilities implements IPublicCapability {
'url' => $this->theming->getBaseUrl(),
'slogan' => $this->theming->getSlogan(),
'color' => $this->theming->getColorPrimary(),
+ 'color-text' => $this->util->invertTextColor($this->theming->getColorPrimary()) ? '#000000' : '#FFFFFF',
'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()),
'background' => $backgroundLogo === 'backgroundColor' ?
$this->theming->getColorPrimary() :