class DependantColor {

    private final Color customColor;
    private final Mode mode;

    public DependantColor() {
        customColor = null;
        this.mode = Mode.PARENT;
    }

    public DependantColor(Mode mode) {
        customColor = mode.equals(Mode.CUSTOM) ? Color.BLACK : null;
        this.mode = mode;
    }

    public DependantColor(Color customColor) {
        this.customColor = customColor;
        this.mode = Mode.CUSTOM;
    }

    public Color getCustomColor() {
        return customColor;
    }

    public Mode getMode() {
        return mode;
    }

    public Color getColor(Color parentColor) {<FILL_FUNCTION_BODY>}

    public enum Mode {

        PARENT, CUSTOM, DARKER
    }
}

        if (mode.equals(Mode.CUSTOM) && customColor != null) {
            return customColor;
        } else if (mode.equals(Mode.DARKER)){
            return parentColor.darker();
        }
        return parentColor;
    
<no_super_class>