class ObjectColorMode implements ColorMode {

    private final VizConfig vizConfig;

    public ObjectColorMode() {
        this.vizConfig = VizController.getInstance().getVizConfig();
    }

    @Override
    public void defaultEdgeColor(Renderer renderer) {
    }

    @Override
    public void defaultNodeColor(Renderer renderer) {
    }

    @Override
    public void textNodeColor(Renderer renderer, NodeModel nodeModel) {
        textColor(renderer, nodeModel, nodeModel.isSelected() || nodeModel.isHighlight());
    }

    @Override
    public void textEdgeColor(Renderer renderer, EdgeModel edgeModel) {
        float[] cl = edgeModel.getColor();
        renderer.setColor(cl[0], cl[1], cl[2], cl[3]);
    }

    protected void textColor(Renderer renderer, TextModel text, boolean selected) {<FILL_FUNCTION_BODY>}

    @Override
    public String getName() {
        return NbBundle.getMessage(ObjectColorMode.class, "ObjectColorMode.name");
    }

    @Override
    public ImageIcon getIcon() {
        return ImageUtilities.loadImageIcon("VisualizationImpl/ObjectColorMode.png", false);
    }

    @Override
    public String toString() {
        return getName();
    }
}

        if (vizConfig.isLightenNonSelected()) {
            if (!selected) {
                float lightColorFactor = 1 - vizConfig.getLightenNonSelectedFactor();
                renderer.setColor(text.getElementProperties().r(), text.getElementProperties().g(),
                    text.getElementProperties().b(), lightColorFactor);
            } else {
                renderer.setColor(text.getElementProperties().r(), text.getElementProperties().g(),
                    text.getElementProperties().b(), 1);
            }
        } else {
            renderer.setColor(text.getElementProperties().r(), text.getElementProperties().g(),
                text.getElementProperties().b(), text.getElementProperties().alpha());
        }
    
<no_super_class>