<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="gradient1" x1="50%" y1="0" x2="50%" y2="100%" gradientUnits="userSpaceOnUse" gradientTransform ="rotate(-45) translate(0 21)">
<stop offset="0%" style="stop-color:rgb(255,0,0); stop-opacity:1" />
<stop offset="50%" style="stop-color:rgb(255,0,0); stop-opacity:1" />
<stop offset="50%" style="stop-color:rgb(0,255,0); stop-opacity:1" />
</linearGradient>
</defs>
<rect x="25" y="25" width="50" height="50"
fill="url(#gradient1)" transform="rotate(45, 50, 50)"
/>
</svg>