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

Incorrect gradients #68

Open
gmcusaro opened this issue Oct 22, 2021 · 0 comments
Open

Incorrect gradients #68

gmcusaro opened this issue Oct 22, 2021 · 0 comments

Comments

@gmcusaro
Copy link

gmcusaro commented Oct 22, 2021

Trying to make a simple gradient between red #ff0000 and blu #0000ff with color spaces HSL and HSB I have an unexpected result. It seem works correctly with RGB and L*a*b*.

Expected behavior should be similar to RGB and L*a*b* spaces.

Additional considerations:

  • For HSL color space, increasing the steps the gradient seems to make the opposite turn of the wheel instead of the shortest way.
  • For HSB I cannot understand which way is used.

Maybe this func could have a bug: mixedHue(source: CGFloat, target: CGFloat) in DynamicColor+Mixing.swift

hsl

hsb

lab

rgb

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

No branches or pull requests

1 participant