diff --git a/web_src/js/features/repo-projects.js b/web_src/js/features/repo-projects.js
index 78a9b14ad..b5a720c9d 100644
--- a/web_src/js/features/repo-projects.js
+++ b/web_src/js/features/repo-projects.js
@@ -204,7 +204,7 @@ function getRelativeColor(color) {
 }
 
 function rgbToHex(rgb) {
-  rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
+  rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+).*\)$/);
   return `#${hex(rgb[1])}${hex(rgb[2])}${hex(rgb[3])}`;
 }