class DependantOriginalColor {

    private final Color customColor;
    private final Mode mode;

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

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

    public Color getCustomColor() {
        return customColor;
    }

    public Mode getMode() {
        return mode;
    }

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

    public enum Mode {

        PARENT, CUSTOM, ORIGINAL
    }
}

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