def encode(self, encoding=None, errors='strict'):
        """Encode using the codec registered for encoding. encoding defaults to the default encoding.

        errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors
        raise a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and 'xmlcharrefreplace' as well as any
        other name registered with codecs.register_error that is able to handle UnicodeEncodeErrors.

        :param str encoding: Codec.
        :param str errors: Error handling scheme.
        """
        return ColorBytes(super(ColorStr, self).encode(encoding, errors), original_class=self.__class__)