Ejemplo n.º 1
0
 public static Color getConnectionColor(DBPConnectionConfiguration connectionInfo) {
   String rgbString = connectionInfo.getConnectionColor();
   if (CommonUtils.isEmpty(rgbString)) {
     rgbString = connectionInfo.getConnectionType().getColor();
   }
   if (CommonUtils.isEmpty(rgbString)) {
     return null;
   }
   Color connectionColor =
       DBeaverUI.getSharedTextColors().getColor(StringConverter.asRGB(rgbString));
   if (connectionColor.getBlue() == 255
       && connectionColor.getRed() == 255
       && connectionColor.getGreen() == 255) {
     // For white color return just null to avoid explicit color set.
     // It is important for dark themes
     return null;
   }
   return connectionColor;
 }