Skip to content
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

Inadequate HSB Precision Causes RGB Values to Change When Adjusting Opacity #655

Open
leewyatt opened this issue Oct 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@leewyatt
Copy link
Contributor

leewyatt commented Oct 3, 2023

Issue Summary:
Adjusting the opacity of a selected color in SceneBuilder results in an unintended change in its RGB values. This is likely due to the inadequate precision of the HSB color representation used.

Expected Behavior

When adjusting the opacity of a selected color, only the alpha (transparency) value should change; the RGB values should remain consistent.

Current Behavior

After selecting a color and then adjusting its opacity, the RGB values of the color shift. This is probably due to converting the color from an HSB representation with inadequate precision.

Proposed Solutions

  1. Increasing the precision of the HSB color representation by one decimal point can provide accurate results for the majority of cases.
  2. If the precision is increased by two decimal points, it will allow for accurate restoration of the vast majority of colors.

Steps to Reproduce

  1. Select a color in the SceneBuilder's ColorPicker.
  2. Adjust the opacity of the selected color.
  3. Observe a change in the RGB values, even though only the opacity was modified.

Your Environment

  • SceneBuilder version: (8),20,21
  • Operating System: Windows 10
  • Java version: (8),20,21

Screenshots

rbg_changed

@leewyatt leewyatt added the bug Something isn't working label Oct 3, 2023
@leewyatt leewyatt mentioned this issue Oct 3, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant