parameters: (byte_string, color, opacity=255, height=None, width=None)
return_statement: return "<img %ssrc=\"data:image/png;base64,%s\">" % (
          style,
          base64.b64encode(tint_raw(byte_string, color, opacity)).decode('ascii')
      )
docstring: Base64 encode the tint.
docstring_summary: Base64 encode the tint.
docstring_tokens: Base64 encode the tint .
function: def tint(byte_string, color, opacity=255, height=None, width=None):
      """Base64 encode the tint."""
  
      style = ''
      if width:
          style = 'style="width: %dpx;"' % width
      if height is not None and style is None:
          style = 'style="height: %dpx;"' % width
      elif height is not None:
          style = style[:-1] + (' height: %dpx;" ' % height)
  
      return "<img %ssrc=\"data:image/png;base64,%s\">" % (
          style,
          base64.b64encode(tint_raw(byte_string, color, opacity)).decode('ascii')
      )
function_tokens: def tint ( byte_string , color , opacity = 255 , height = None , width = None ) : style = '' if width : style = 'style="width: %dpx;"' % width if height is not None and style is None : style = 'style="height: %dpx;"' % width elif height is not None : style = style [ : - 1 ] + ( ' height: %dpx;" ' % height ) return "<img %ssrc=\"data:image/png;base64,%s\">" % ( style , base64 . b64encode ( tint_raw ( byte_string , color , opacity ) ) . decode ( 'ascii' ) )