How can I make a rectangle with basically a fade to middle gradient on both vertical sides and also gradients from the bottom of both horizontal sides of the rectangle? I cant use radial because that is equal gradient on all sides where I want the gradients on the horizontal sides to end quickly, because it's a rectangle. Get it? If i try to do clipping with the rect it gets weird because the gradients don't match. Thanks.
You can place a microscopic scaled copy of the rectangle in the middle with different color and make a blend
In the bottom there's a colored curve in the background to show how it works with transparency. The red rectangle in the blend above is selected and its color is changed to the same blue as the bigger one has, but the opacity is 0%
You cannot fade the apparent diagonal rays for ex. by changing the shape in the middle. The rays are a consequence of the fact that the gradient must be less steep towards the corners.
If you cannot accept the rays, you can fill an exact square with a symmetric radial gradient and then squeeze the square to the wanted aspect ratio.
In theory you can also proceed with gradients. With help lines (=diagonal and a perpendicular one) you can place a linear gradient:
Make a flipped copy and combine the rectangles with a blending mode. I used multiply.
The result can be used as opacity mask for a solid color rectangle:
The result isn't as linear as with blending. That can be helped by moving the half stop markers of the gradient towards the ends.