.getOuterTextComponentBorderColor(lightColor); float[] hsb = Color.RGBtoHSB(lightColor.getRed(), lightColor.getGreen(), lightColor.getBlue(), null);
.getOuterTextComponentBorderColor(lightColor); float[] hsb = Color.RGBtoHSB(lightColor.getRed(), lightColor.getGreen(), lightColor.getBlue(), null);
public static Color getTextBackgroundFillColor(JComponent comp) { Color backgroundFillColor = SubstanceColorUtilities .getBackgroundFillColor(comp); JTextComponent componentForTransitions = SubstanceCoreUtilities .getTextComponentForTransitions(comp); if (componentForTransitions != null) { ComponentUI ui = componentForTransitions.getUI(); if (ui instanceof TransitionAwareUI) { TransitionAwareUI trackable = (TransitionAwareUI) ui; StateTransitionTracker stateTransitionTracker = trackable .getTransitionTracker(); Color outerTextComponentBorderColor = SubstanceColorUtilities .getOuterTextComponentBorderColor(backgroundFillColor); outerTextComponentBorderColor = SubstanceColorUtilities .getInterpolatedColor(outerTextComponentBorderColor, backgroundFillColor, 0.6); float selectionStrength = stateTransitionTracker .getFacetStrength(ComponentStateFacet.SELECTION); float rolloverStrength = stateTransitionTracker .getFacetStrength(ComponentStateFacet.ROLLOVER); backgroundFillColor = SubstanceColorUtilities .getInterpolatedColor(outerTextComponentBorderColor, backgroundFillColor, Math.max( selectionStrength, rolloverStrength)); } } return backgroundFillColor; }
public static Color getTextBackgroundFillColor(JComponent comp) { Color backgroundFillColor = SubstanceColorUtilities .getBackgroundFillColor(comp); JTextComponent componentForTransitions = SubstanceCoreUtilities .getTextComponentForTransitions(comp); if (componentForTransitions != null) { ComponentUI ui = componentForTransitions.getUI(); if (ui instanceof TransitionAwareUI) { TransitionAwareUI trackable = (TransitionAwareUI) ui; StateTransitionTracker stateTransitionTracker = trackable .getTransitionTracker(); Color outerTextComponentBorderColor = SubstanceColorUtilities .getOuterTextComponentBorderColor(backgroundFillColor); outerTextComponentBorderColor = SubstanceColorUtilities .getInterpolatedColor(outerTextComponentBorderColor, backgroundFillColor, 0.6); float selectionStrength = stateTransitionTracker .getFacetStrength(ComponentStateFacet.SELECTION); float rolloverStrength = stateTransitionTracker .getFacetStrength(ComponentStateFacet.ROLLOVER); backgroundFillColor = SubstanceColorUtilities .getInterpolatedColor(outerTextComponentBorderColor, backgroundFillColor, Math.max( selectionStrength, rolloverStrength)); } } return backgroundFillColor; }