Skip to content

Remove hue from ImageColorTransformer#forHSB #2060 #2091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025

Conversation

HeikoKlare
Copy link
Contributor

The ImageColorTransformer introduced for disabled icon calculation has a default implementation taking hue, saturation, brightness and alpha factors for transformation. The hue factor was by accident limited to 1, even though it is a value between 0 and 360. In addition, a multiplication of a hue value with a factor is not reasonable at all.

This change removes the ability to change the hue of a color value, as the existing usage of that method does not change the hue anyway. It renames the method accordingly.

Fixes #2060

The ImageColorTransformer introduced for disabled icon calculation has a
default implementation taking hue, saturation, brightness and alpha
factors for transformation. The hue factor was by accident limited to 1,
even though it is a value between 0 and 360. In addition, a
multiplication of a hue value with a factor is not reasonable at all.

This change removes the ability to change the hue of a color value, as
the existing usage of that method does not change the hue anyway. It
renames the method accordingly.

Fixes eclipse-platform#2060

Co-authored-by: Manuel Killinger <[email protected]>
@HeikoKlare
Copy link
Contributor Author

@killingerm I have created this PR with you as co author as the fix should be in M2 (in case people start using the new disablement algorithm already promoted via the new and noteworty) and today is last chance to do it. I have also adapted you proposal as applying a factor to a hue value does, in my opinion, not make any sense anyway and since that value is not used by the existing consumers, I have now simply removed it.

Copy link
Contributor

github-actions bot commented May 5, 2025

Test Results

   545 files  ±0     545 suites  ±0   28m 52s ⏱️ + 3m 19s
 4 374 tests ±0   4 356 ✅ ±0   18 💤 ±0  0 ❌ ±0 
16 638 runs  ±0  16 498 ✅ ±0  140 💤 ±0  0 ❌ ±0 

Results for commit 3ced9d7. ± Comparison against base commit dd30aff.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review May 5, 2025 10:08
@HeikoKlare HeikoKlare merged commit 58c5cb9 into eclipse-platform:master May 5, 2025
17 checks passed
@HeikoKlare HeikoKlare deleted the issue-2060 branch May 5, 2025 12:06
@killingerm
Copy link
Contributor

@killingerm I have created this PR with you as co author as the fix should be in M2 (in case people start using the new disablement algorithm already promoted via the new and noteworty) and today is last chance to do it. I have also adapted you proposal as applying a factor to a hue value does, in my opinion, not make any sense anyway and since that value is not used by the existing consumers, I have now simply removed it.

@HeikoKlare Thank you for fixing it, my IDE broke after an update and I had to reinstall therefore din't manage it in time. Also just removing it was probably the best option.

@HeikoKlare
Copy link
Contributor Author

No worries, I just urged with this to have a proper version of the disablement algorithm provided with M2, so to not ship a broken one that may give a bad first impression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The new Image disabling algorithm sets every disabled images hue to red
2 participants