I have a pentagon that I want to fill with a gradient. The effect should be that one side of the pentagon is uniformly white, and the two opposite sides are uniformly black, with a smooth transition in between. I've tried doing this by overlapping several linear gradients, but the result just doesn't look smooth.

The effect should be something like this, but better obviously. enter image description here

I'm using CS6.

3 Answers 3

  1. Create two copies of the shape, one black and one white, with the white shape's layer on top.
  2. Put both shapes in a group and create a mask using the area of the shape (Ctrl+Click the layer icon).
  3. Blur the white shape and move it as desired.


  • Ok this wasn't exactly the right solution for my case, but it led me onto the right path (posted below) so thanks
    – publius10
    Commented Oct 8, 2020 at 8:12

Make a bigger white shape, insert layer style Inner Glow to it:

enter image description here

Insert an empty top layer, select both layers and apply Layer > Merge Layers (not Merge Down!). Now you have a piece which can be freely splitted:

enter image description here

Before fixing the effect by merging you can play a little with the contour curve to get different gradient.

enter image description here

A way to get very round gradient is to apply Surface blur to the combined version:

enter image description here

Actually the whole process can be based on layering blurred shapes as already said in another answer. But that method becomes complex if you need something like straight sharply beveled edges.


Ok I figured out how to do this, leaving a guide for future me.

  1. Create a white shape enter image description here
  2. Apply a horizontal gradient along the shortest side enter image description here
  3. Select just the gradient portion enter image description here
  4. Transform this using warp (Edit->Transform->Warp) enter image description here
  5. Move the point in the bottom right to the bottom right corner, the one above it to halfway along the bottom line, and the one above that to halfway along the top line enter image description hereenter image description here
  6. Voila enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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