class_docstr: A dataclass for specifying options for the brush tool in the ImageEditor component. An instance of this class can be passed to the `brush` parameter of `gr.ImageEditor`.
  Parameters:
      default_size: The default radius, in pixels, of the brush tool. Defaults to "auto" in which case the radius is automatically determined based on the size of the image (generally 1/50th of smaller dimension).
      colors: A list of colors to make available to the user when using the brush. Defaults to a list of 5 colors.
      default_color: The default color of the brush. Defaults to the first color in the `colors` list.
      color_mode: If set to "fixed", user can only select from among the colors in `colors`. If "defaults", the colors in `colors` are provided as a default palette, but the user can also select any color using a color picker.
class_docstr_tok: ["A","dataclass","for","specifying","options","for","the","brush","tool","in","the","ImageEditor","component",".","An","instance","of","this","class","can","be","passed","to","the","`","brush","`","parameter","of","`","gr.ImageEditor","`",".","Parameters",":","default_size",":","The","default","radius",",","in","pixels",",","of","the","brush","tool",".","Defaults","to","``","auto","''","in","which","case","the","radius","is","automatically","determined","based","on","the","size","of","the","image","(","generally","1\/50th","of","smaller","dimension",")",".","colors",":","A","list","of","colors","to","make","available","to","the","user","when","using","the","brush",".","Defaults","to","a","list","of","5","colors",".","default_color",":","The","default","color","of","the","brush",".","Defaults","to","the","first","color","in","the","`","colors","`","list",".","color_mode",":","If","set","to","``","fixed","''",",","user","can","only","select","from","among","the","colors","in","`","colors","`",".","If","``","defaults","''",",","the","colors","in","`","colors","`","are","provided","as","a","default","palette",",","but","the","user","can","also","select","any","color","using","a","color","picker","."]
code: def __post_init__(self):
      if self.colors is None:
          self.colors = [
              "rgb(204, 50, 50)",
              "rgb(173, 204, 50)",
              "rgb(50, 204, 112)",
              "rgb(50, 112, 204)",
              "rgb(173, 50, 204)",
          ]
      if self.default_color is None:
          self.default_color = (
              self.colors[0]
              if isinstance(self.colors, list)
              else self.colors
          )
  
imports: from __future__ import annotations
  import dataclasses
  import warnings
  from pathlib import Path
  from typing import Any, Iterable, List, Literal, Optional, TypedDict, Union, cast
  import numpy
  from gradio_client.documentation import document, set_documentation_group
  from PIL import Image
  import gradio.image_utils
  from gradio import utils
  from gradio.components.base import Component
  from gradio.data_classes import FileData, GradioModel
  from gradio.events import Events
label_desc: Use image node_id 1 for calling the Brush obj's underlying member method code with example usage: obj.__post_init__() without return types