public static Color foreground() { return new JBColor(new NotNullProducer<Color>() { @NotNull @Override public Color produce() { return UIUtil.getLabelForeground(); } }); }
@Override public Color getBorderColor() { return JBColor.border(); }
@Contract(pure = true) @NotNull private Color color(@NotNull final PsiElement element) { Color color = JBColor.foreground(); if (isIgnored(element)) { color = ElixirSyntaxHighlighter.IGNORED_VARIABLE.getDefaultAttributes().getForegroundColor(); } else { Parameter parameter = new Parameter(element); Parameter.Type parameterType = Parameter.putParameterized(parameter).type; if (parameterType != null) { if (parameterType == Parameter.Type.VARIABLE) { color = ElixirSyntaxHighlighter.PARAMETER.getDefaultAttributes().getForegroundColor(); } } else if (isParameterWithDefault(element)) { color = ElixirSyntaxHighlighter.PARAMETER.getDefaultAttributes().getForegroundColor(); } else if (isVariable(element)) { color = ElixirSyntaxHighlighter.VARIABLE.getDefaultAttributes().getForegroundColor(); } } return color; }
@Override public Color darker() { if (func != null) { return new JBColor(new NotNullProducer<Color>() { @NotNull @Override public Color produce() { return func.produce().darker(); } }); } return new JBColor(super.darker(), getDarkVariant().darker()); }
private void paintMacThumb(Graphics g, Rectangle thumbBounds) { if (isMacScrollbarHiddenAndXcodeLikeScrollbar()) return; thumbBounds = getMacScrollBarBounds(thumbBounds, true); Graphics2D g2d = (Graphics2D)g; if (Registry.is("mac.scroll.new.ui")) { float value = (float)(1 - myMacScrollbarFadeLevel); if (!myMacScrollbarHidden || alwaysPaintThumb()) { RegionPainter<Float> painter = isDark() ? JBScrollPane.MAC_THUMB_DARK_PAINTER : JBScrollPane.MAC_THUMB_PAINTER; painter.paint(g2d, thumbBounds.x - 2, thumbBounds.y - 2, thumbBounds.width + 4, thumbBounds.height + 4, value); } return; } RenderingHints oldHints = g2d.getRenderingHints(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); JBColor baseColor = new JBColor(() -> !isDark() ? com.intellij.ui.Gray._0 : com.intellij.ui.Gray._128); int arc = Math.min(thumbBounds.width, thumbBounds.height); if (alwaysPaintThumb()) { //noinspection UseJBColor g2d.setColor(new Color(baseColor.getRed(), baseColor.getGreen(), baseColor.getBlue(), isDark() ? 100 : 40)); g2d.fillRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc); //g2d.drawRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc); } if (!myMacScrollbarHidden) { g2d.setColor(adjustColor(baseColor)); g2d.fillRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc); } g2d.setRenderingHints(oldHints); }
@Override public int getRed() { final Color c = getColor(); return c == this ? super.getRed() : c.getRed(); }
final Color end = adjustColor(getTrackBackground().brighter());
@Override public Color brighter() { if (func != null) { return new JBColor(new NotNullProducer<Color>() { @NotNull @Override public Color produce() { return func.produce().brighter(); } }); } return new JBColor(super.brighter(), getDarkVariant().brighter()); }
@Override public int getBlue() { final Color c = getColor(); return c == this ? super.getBlue() : c.getBlue(); }
public static Color border() { return new JBColor(new NotNullProducer<Color>() { @NotNull @Override public Color produce() { //noinspection deprecation return UIUtil.getBorderColor(); } }); } }
private void updateSelectedTabForeground() { if (UIUtil.isUnderAquaLookAndFeel() && SystemInfo.isMacOSLion) { if (getSelectedIndex() != -1 && getTabComponentAt(getSelectedIndex()) != null) { getTabComponentAt(getSelectedIndex()).setForeground(Color.WHITE); } if (previousSelectedIndex != -1 && getTabComponentAt(previousSelectedIndex) != null) { getTabComponentAt(previousSelectedIndex).setForeground(JBColor.foreground()); } } }
private static Color getBorderColor() { return JBColor.border(); }
@Override public int getAlpha() { final Color c = getColor(); return c == this ? super.getAlpha() : c.getAlpha(); }
public static Color background() { return new JBColor(new NotNullProducer<Color>() { @NotNull @Override public Color produce() { return UIUtil.getListBackground(); } }); }
this.dependencyCellRenderer.omittedSelected = JBColor.MAGENTA; this.dependencyCellRenderer.omittedUnselected = JBColor.GRAY; this.dependencyCellRenderer.normalSelected = JBColor.foreground(); this.dependencyCellRenderer.normalUnselected = JBColor.BLACK; this.information.setEditable(false);
mainPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, JBColor.border()));
@Override public int getGreen() { final Color c = getColor(); return c == this ? super.getGreen() : c.getGreen(); }
private static Color getBorderColor() { return new JBColor(Gray._150, Gray._100); }
@Override public int getRGB() { final Color c = getColor(); return c == this ? super.getRGB() : c.getRGB(); }
public static Color getListUnfocusedSelectionBackground() { return new JBColor(UNFOCUSED_SELECTION_COLOR, new Color(13, 41, 62)); }