import ( "image" )
rect := image.Rect(10, 10, 60, 110)
img := image.NewRGBA(image.Rect(0, 0, 200, 200))
red := color.RGBA{255, 0, 0, 255} draw.Draw(img, rect, &image.Uniform{red}, image.Point{}, draw.Src)This will create an image with a red rectangle in the top left corner. In this example, we used the "image" package, which is part of the Go standard library.