summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2018-05-18 12:23:32 +0200
committerGitHub <noreply@github.com>2018-05-18 12:23:32 +0200
commit140c98ad9bba75fcbbbf58cb691dacf902a2b98e (patch)
tree06cbe2e57916ded620da8fe88f02456fb0e2dd5c
parentc5a28c5efafd9926ecbc2662578194eac7c5fe3b (diff)
parent7415a539260bd2ac1e11f00ed462a849805c1d91 (diff)
Merge pull request #555 from nextcloud/new-colour-generator-comp
Update colour to default server generator
-rw-r--r--js/filters/contactColor_filter.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/filters/contactColor_filter.js b/js/filters/contactColor_filter.js
index 8c4645b9..eb9e4402 100644
--- a/js/filters/contactColor_filter.js
+++ b/js/filters/contactColor_filter.js
@@ -2,7 +2,10 @@ angular.module('contactsApp')
.filter('contactColor', function() {
return function(input) {
// Check if core has the new color generator
- if(typeof input.toHsl === 'function') {
+ if(typeof input.toRgb === 'function') {
+ var rgb = input.toRgb();
+ return 'rgb('+rgb['r']+', '+rgb['g']+', '+rgb['b']+')';
+ } else if(typeof input.toHsl === 'function') {
var hsl = input.toHsl();
return 'hsl('+hsl[0]+', '+hsl[1]+'%, '+hsl[2]+'%)';
} else {