Skip to content

MudColor: Fix ColorRgbDarken and ColorRgbLighten#8206

Merged
henon merged 2 commits intoMudBlazor:devfrom
50c:color
Feb 20, 2024
Merged

MudColor: Fix ColorRgbDarken and ColorRgbLighten#8206
henon merged 2 commits intoMudBlazor:devfrom
50c:color

Conversation

@50c
Copy link
Contributor

@50c 50c commented Feb 20, 2024

Description

Not complete initialization of MudColor's hsl values lead to hard to detect bugs if those values are used like ColorRgbDarken or ColorRgbLighten

resolves #8205

How Has This Been Tested?

Unit tests are added

tests are parse rgb value and then darken it and compares with same darken colors but created from rgb parameters

I have created new unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Feb 20, 2024
@codecov
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dc3baf8) 88.22% compared to head (dd32df1) 88.23%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #8206   +/-   ##
=======================================
  Coverage   88.22%   88.23%           
=======================================
  Files         394      394           
  Lines       11764    11764           
  Branches     2385     2383    -2     
=======================================
+ Hits        10379    10380    +1     
  Misses        857      857           
+ Partials      528      527    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ScarletKuro ScarletKuro requested a review from henon February 20, 2024 19:27
@henon henon changed the title MudColor from rgb(a) format with hsl MudColor: Fix ColorRgbDarken and ColorRgbLighten Feb 20, 2024
@henon henon merged commit f620be7 into MudBlazor:dev Feb 20, 2024
@henon
Copy link
Contributor

henon commented Feb 20, 2024

Perfect, thank you!

@50c 50c deleted the color branch February 21, 2024 06:57
biegehydra pushed a commit to biegehydra/MudBlazor that referenced this pull request Apr 26, 2024
* extended theme provider tests

* fix: CalculateHSL is called not only for hex string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MudColor .ctor with string parameters doesn't calculate hsl values for rgb(a) format

3 participants