Color methods

Color's methods such as saturation(), brightness() return View, so do View's methods with the same names. Shouldn't Color's methods return Color, for color manipulation?

Replies

A few do so, like


func opacity(_ opacity: Double) -> Color


Have you written code that uses saturation() or brightness() on Color ?

I want to compute custom Color's with saturation() for gradient, but could not.

What I understand is that this color will be used in a view (may be of plain color).

And the saturation() should apply to this view and return a new view.

That case should be handled by the methods of View instead of methods of Color. How to generate a custom gradient based on a certain Color?