Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Darken bright colours of work package types in email so that they are still readable in white background

Henriette Dargef467f7a52f54
diff --git a/app/helpers/mail_notification_helper.rb b/app/helpers/mail_notification_helper.rb
index e825c84e37d..8143fd17b06 100644
--- a/app/helpers/mail_notification_helper.rb
+++ b/app/helpers/mail_notification_helper.rb
@@ -41,7 +41,12 @@ module MailNotificationHelper
def type_color(type, default_fallback)
color_id = selected_color(type)
- color_id ? Color.find(color_id).hexcode : default_fallback
+ if color_id
+ color = Color.find(color_id)
+ return color.super_bright? ? darken_color(color.hexcode, 0.75) : color.hexcode
+ end
+
+ default_fallback
end
def status_colors(status)