class ColorActivation {

    public static boolean isActivated() {
        String color = System.getProperty("maven.color");
        if (color != null) {
            return Boolean.valueOf(color);
        }

        String activation = System.getProperty("style.color");
        if ("always".equals(activation)) {
            return true;
        }
        if ("never".equals(activation)) {
            return false;
        }

        Set<String> args = split(System.getenv("MAVEN_CMD_LINE_ARGS"));
        return !isBatchMode(args) && !isLogFile(args) && !isDumbTerminal();
    }

    private  ColorActivation();

}