code: def unparse_color(r, g, b, a, type):
      """
      Take the r, g, b, a color values and give back
      a type css color string. This is the inverse function of parse_color
      """
      if type == "#rgb":
          # Don't lose precision on rgb shortcut
          if r % 17 == 0 and g % 17 == 0 and b % 17 == 0:
              return "#%x%x%x" % (int(r / 17), int(g / 17), int(b / 17))
          type = "#rrggbb"
  
      if type == "#rgba":
          if r % 17 == 0 and g % 17 == 0 and b % 17 == 0:
              return "#%x%x%x%x" % (
                  int(r / 17),
                  int(g / 17),
                  int(b / 17),
                  int(a * 15),
              )
          type = "#rrggbbaa"
  
      if type == "#rrggbb":
          return "#%02x%02x%02x" % (r, g, b)
  
      if type == "#rrggbbaa":
          return "#%02x%02x%02x%02x" % (r, g, b, int(a * 255))
  
      if type == "rgb":
          return "rgb(%d, %d, %d)" % (r, g, b)
  
      if type == "rgba":
          return "rgba(%d, %d, %d, %g)" % (r, g, b, a)
  
file_path: pygal/pygal/colors.py
imports: from __future__ import division
label_desc: Use image node_id 5 for calling a global function with example usage: unparse_color(r, g, b, a, type) and returns: unknown, unknown, unknown, unknown, unknown, unknown