public static ColorBuffer of(ColorFormatter colors, CliPrinter sink) {
        StringBuilder buffer = new StringBuilder();
        return new ColorBuffer(colors, buffer, s -> sink.append(s.toString()));
    }
Create a new ColorBuffer that stores all output to an internal buffer and only writes to the given
{@link CliPrinter} when {@link #close()} is called.

@param colors ColorFormatter used to provide colors and style.
@param sink   Where to write.
@return       Returns the created buffer.
smithy-cli/src/main/java/software/amazon/smithy/cli/ColorBuffer.java