Java Utililty Methods Color Value

List of utility methods to do Color Value

Description

The list of methods to do Color Value are organized into topic(s).

Method

ColorgetMediumDarkColor()
get Medium Dark Color
return UIManager.getColor(TABLE_GRID_COLOR_KEY);
ColorgetNimbusDisabledTextColor()
Returns the Nimbus look and feel's disabled text color.
return new Color(UIManager.getColor("nimbusDisabledText").getRGB());
ColorgetRolloverColor()
get Rollover Color
if (rollColor == null) {
    rollColor = getColorAlfa(UIManager.getColor("Button.focus"), 40);
return rollColor;
ColorgetSubstanceColor(String name)
Returns a color from the currently active Substance skin.
Color color = null;
name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
LookAndFeel laf = UIManager.getLookAndFeel();
ClassLoader cl = (ClassLoader) UIManager.get("ClassLoader");
if (cl != null) {
    Class<?> clazz = Class.forName(PKG + "SubstanceLookAndFeel", true, cl);
    if (clazz.isInstance(laf)) {
        Class<?> skinClazz = Class.forName(PKG + "SubstanceSkin", true, cl);
...
ColorgetTextColor()
get Text Color
final Color c = nimbusDefaults == null ? null : nimbusDefaults.getColor("text");
return c == null ? defaultTextColor : c;
ColorgetTextForegroundColor()
Method to get the Synthetica text foreground color.
Object object = UIManager.getColor("Label.foreground");
Color color;
if (object != null && object instanceof Color) {
    color = (Color) object;
} else {
    color = new JLabel().getForeground();
return color;
...
ColorgetTextInactiveTextColor()
get Text Inactive Text Color
return getInactiveTextColor();
JTextPanegetTextPaneLabel(JScrollPane jsp, Color textColor)
get Text Pane Label
JTextPane textPane = new JTextPane();
textPane.setOpaque(false);
textPane.setEditable(false);
textPane.setDisabledTextColor(textColor);
if (jsp != null) {
    jsp.setViewportView(textPane);
    jsp.setBorder(BorderFactory.createEmptyBorder());
return textPane;
ColorgetTitleLineBorderColor()
get Title Line Border Color
Border b = UIManager.getBorder("TitledBorder.border");
if (b instanceof LineBorder) {
    return ((LineBorder) b).getLineColor();
return Color.GRAY;
ColorgetUIColor(String code)
get UI Color
Color color = UIManager.getColor(code);
return new Color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());