aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features')
-rw-r--r--web_src/js/features/repo-projects.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web_src/js/features/repo-projects.js b/web_src/js/features/repo-projects.js
index 11f5518283..abbe23458e 100644
--- a/web_src/js/features/repo-projects.js
+++ b/web_src/js/features/repo-projects.js
@@ -1,5 +1,5 @@
import $ from 'jquery';
-import {useLightTextOnBackground} from '../utils.js';
+import {useLightTextOnBackground, hexToRGBColor} from '../utils/color.js';
const {csrfToken} = window.config;
@@ -190,7 +190,8 @@ export function initRepoProject() {
}
function setLabelColor(label, color) {
- if (useLightTextOnBackground(color)) {
+ const [r, g, b] = hexToRGBColor(color);
+ if (useLightTextOnBackground(r, g, b)) {
label.removeClass('dark-label').addClass('light-label');
} else {
label.removeClass('light-label').addClass('dark-label');