x256 implementation for writing colored strings.