Skip to content

Incorrect gradients #68

@gmcusaro

Description

@gmcusaro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions