Noticed and appreciated the addition, but still I think @jimc’s idea of having a method that takes top and bottom colour and an area, would save even more typing in many cases.
Yeah, when I looked at all the places I’d used it, I didn’t see anywhere that would have benefitted from that method, but yup, good FR, I’ll probably throw that in there too.
I liked mine better for killing the typing, but the range is a less confusing interface probably. Probably should be a template so that cast to float isn’t needed there I guess?
I went for the colour, float approach because with gradients you might want them to go in the opposite direction, e.g. vertical (bottomColour, 100, topColour, 0), which would be confusing if you had to convert it to a Range
Yes, but personally I don’t always want to think of the gradient as top-to-bottom, it’s just between two colours, each with a coordinate, and the order that you give them doesn’t really seem like it should matter.