The easier way is to draw the whole rounded rectangle with the colors you want. Adjust the arc values +/- until it looks the way you want.
<!--- draw rounded rectangle. adjust the curves however you want --->
<!--- ImageDrawRoundRect(name, x, y, width, height, arcWidth, arcHeight [, filled]) --->
<cfset img = ImageNew("", 40, 40, "rgb", "blue")>
<cfset ImageSetAntialiasing(img, "on")>
<cfset ImageSetDrawingColor(img, "white") />
<cfset ImageDrawRoundRect(img, 0, 0, 40, 40, 40, 40,"yes")>
<div style="background-color: red;">
Whole image<br> <cfimage action="writeToBrowser" source="#img#">
</div>
Then chop it into 4 pieces (ie top left corner, top right corner, etc...) and just use the ones you want.
<!--- ImageCopy(name, x, y, width, height) --->
<cfset topLeft = ImageCopy(img, 0, 0, 20, 20)>
<cfset topRight = ImageCopy(img, 20, 0, 20, 20)>
<cfset botLeft = ImageCopy(img, 0, 20, 20, 20)>
<cfset botRight = ImageCopy(img, 20, 20, 20, 20)>
<div style="background-color: red;">
Pieces <br>
<cfimage action="writeToBrowser" source="#topLeft#">
<cfimage action="writeToBrowser" source="#topRight#"><br>
<cfimage action="writeToBrowser" source="#botLeft#">
<cfimage action="writeToBrowser" source="#botRight#">
</div>