private static ColorFormatter createDelegatedColorFormatter(Supplier<ColorFormatter> delegateSupplier) {
        return new ColorFormatter() {
            @Override
            public String style(String text, Style... styles) {
                return delegateSupplier.get().style(text, styles);
            }

            @Override
            public void style(Appendable appendable, String text, Style... styles) {
                delegateSupplier.get().style(appendable, text, styles);
            }

            @Override
            public boolean isColorEnabled() {
                return delegateSupplier.get().isColorEnabled();
            }

            @Override
            public void println(Appendable appendable, String text, Style... styles) {
                delegateSupplier.get().println(appendable, text, styles);
            }

            @Override
            public void startStyle(Appendable appendable, Style... style) {
                delegateSupplier.get().startStyle(appendable, style);
            }

            @Override
            public void endStyle(Appendable appendable) {
                delegateSupplier.get().endStyle(appendable);
            }
        };
    }
Execute the command line using the given arguments.

@param args Arguments to parse.
@return Returns the exit code.
@throws CliError on error.
smithy-cli/src/main/java/software/amazon/smithy/cli/Cli.java