code: def draw_img_button(width=200, height=50, text='This is a button', color=rgb(200,100,50)):
      
      
      surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
      ctx = cairo.Context(surface)
      ctx.rectangle(0, 0, width - 1, height - 1)
  
      ctx.set_source_rgb(color.red/255.0, color.green/255.0, color.blue/255.0)
      ctx.fill()
      
      # Draw text
      ctx.set_source_rgb(1.0, 1.0, 1.0)
      ctx.select_font_face(
          "Helvetica",
          cairo.FONT_SLANT_NORMAL,
          cairo.FONT_WEIGHT_BOLD
      )
      ctx.set_font_size(15.0)
      ctx.move_to(15, 2 * height / 3)
      ctx.show_text(text)
      
      surface.write_to_png('button.png')
docs: Draws a simple image button.