You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to invert only the brightness while retaining the hue and saturation of a color. Is this possible? There is currently DynamicColor.invert. Would it be useful to add a DynamicColor.invertBrightness ?
I tried with the following code, and I get inconsistent results (for example, light-medium orange becomes almost black instead of dark orange). Mostly I'm finding the resulting colors are darker then I would expect.
let hue = hueComponent
let saturation = saturationComponent
let brightness = 1 - brightnessComponent
let alpha = alphaComponent
return DynamicColor(hue:hue, saturation:saturation, brightness:brightness, alpha:alpha)
The text was updated successfully, but these errors were encountered:
It would be helpful to invert only the brightness while retaining the hue and saturation of a color. Is this possible? There is currently
DynamicColor.invert
. Would it be useful to add aDynamicColor.invertBrightness
?I tried with the following code, and I get inconsistent results (for example, light-medium orange becomes almost black instead of dark orange). Mostly I'm finding the resulting colors are darker then I would expect.
The text was updated successfully, but these errors were encountered: