1

Is there a way to set a color to each vertex of a polygon and have they blend to form a gradient between them?

A great example of this would be the HSV triangle from Coolorus (first image on the right). That triangle has a white vertex, a black one and a yellow one. That cannot be made by hand using linear gradient as far as I know.

  • 2
    You could do it in Illustrator with a gradient mesh. – Cai May 11 '16 at 1:23
1

The easiest way to do this may be to apply multiple Gradient Overlay layer styles to your polygon, each set to Multiply with a different angle. It'll just be a matter of calculating the angles required.

enter image description here

Here's a triangle with this three-gradient thing applied (very loosely, the angles are very rough). It's by no means perfect, but it might be as close as you're going to get.

  • That can't be done. A triangle when divided into 3 don't give 3 rectangles, but three more triangles. Unless there's a triangle gradient that I don't know about, it's not possible. I tried it already, and I do get close, but it's not useful in my case. It needs to be perfect. See: i.stack.imgur.com/slHHe.jpg – Mister R.U.B.I May 11 '16 at 1:13
  • Yeah, I see what you mean. Close but no cigar. – Alex May 11 '16 at 1:21
  • Well, I guess I need to write my own program. Thanks anyways. – Mister R.U.B.I May 11 '16 at 1:23
  • or, as @CAI suggests above, use Illustrator – Alex May 11 '16 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.