SimpleTextAttributes (@NotNull SimpleTextAttributes baseStyle) { Color color = baseStyle.getFgColor(); int alpha = color != null ? color.getAlpha() : 255; Color linkColor = JBUI.CurrentTheme.Link.Foreground.ENABLED; @SuppressWarnings("UseJBColor") Color resultColor = new Color(linkColor.getRed(), linkColor.getGreen(), linkColor.getBlue(), alpha); return new SimpleTextAttributes(baseStyle.getStyle() | SimpleTextAttributes.STYLE_UNDERLINE, resultColor); }