code: def apply_text(incoming, func):
      
      split = RE_SPLIT.split(incoming)
      for i, item in enumerate(split):
          if not item or RE_SPLIT.match(item):
              continue
          split[i] = func(item)
      return incoming.__class__().join(split)
docs: Call `func` on text portions of incoming color string.
  
      :param iter incoming: Incoming string/ColorStr/string-like object to iterate.
      :param func: Function to call with string portion as first and only parameter.
  
      :return: Modified string, same class type as incoming string.