aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-projects.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/repo-projects.js')
-rw-r--r--web_src/js/features/repo-projects.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web_src/js/features/repo-projects.js b/web_src/js/features/repo-projects.js
index 21cb567456..3147626b51 100644
--- a/web_src/js/features/repo-projects.js
+++ b/web_src/js/features/repo-projects.js
@@ -171,9 +171,9 @@ export default function initRepoProject() {
}
function setLabelColor(label, color) {
- const red = getRelativeColor(parseInt(color.substr(1, 2), 16));
- const green = getRelativeColor(parseInt(color.substr(3, 2), 16));
- const blue = getRelativeColor(parseInt(color.substr(5, 2), 16));
+ const red = getRelativeColor(parseInt(color.slice(1, 3), 16));
+ const green = getRelativeColor(parseInt(color.slice(3, 5), 16));
+ const blue = getRelativeColor(parseInt(color.slice(5, 7), 16));
const luminance = 0.2126 * red + 0.7152 * green + 0.0722 * blue;
if (luminance > 0.179) {