Skip to content

Lighten colours with alpha instead of admixing white#3252

Merged
vladsavelyev merged 5 commits intomainfrom
lighten_with_alpha_rebase
Jul 3, 2025
Merged

Lighten colours with alpha instead of admixing white#3252
vladsavelyev merged 5 commits intomainfrom
lighten_with_alpha_rebase

Conversation

@ewels
Copy link
Member

@ewels ewels commented Jul 3, 2025

This PR refactors MultiQC's colour lightening functionality to use alpha transparency instead of mixing colours with white. This change ensures colours render correctly on both light and dark backgrounds.

  • Updated mqc_colour_scale.lighten_colour() to return rgba strings with calculated alpha values instead of mixing with white
  • Modified get_colour() method to use the new alpha-based lightening approach
  • Updated bargraph plotting code to handle rgba color strings properly
  • Added rgba color validation support in ValidatedConfig.parse_color()
  • Refactored xenome module to use the common color lightening function instead of duplicating logic
  • Updated somalier module's _make_col_alpha() to handle rgba input colors

⚠️ This is a fairly major PR that changes a key aspect of report rendering for all MultiQC runs

@ewels ewels requested a review from vladsavelyev July 3, 2025 08:17
@vladsavelyev vladsavelyev added this to the v1.30 milestone Jul 3, 2025
@vladsavelyev vladsavelyev merged commit a8b1954 into main Jul 3, 2025
12 checks passed
@vladsavelyev vladsavelyev deleted the lighten_with_alpha_rebase branch July 3, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants