Class DiffColors
java.lang.Object
org.eclipse.compare.internal.DiffColors
The shared color palette for diff rendering. Both the traditional two-way
TextMergeViewer and the unified diff interpolate the same diff color
towards the background at the same scales, so the scale factors and the
interpolation live here once.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleBorder /normalweight: darker and more saturated than the fill.static final doubleThe hunk fill band; the lightest of the three.static final doubleThe detailed (word-level) diff text background. -
Method Summary
Modifier and TypeMethodDescriptionstatic RGBborderColor(RGB diffColor, RGB background) Border color of an addition/deletion hunk; darker than the fill band.static RGBinterpolate(RGB fg, RGB bg, double scale) Linearly interpolates betweenfgandbg: scale 0 returnsfg, scale 1 returnsbg.
-
Field Details
-
BORDER_SCALE
public static final double BORDER_SCALEBorder /normalweight: darker and more saturated than the fill.- See Also:
-
TEXT_FILL_SCALE
public static final double TEXT_FILL_SCALEThe detailed (word-level) diff text background.- See Also:
-
FILL_SCALE
public static final double FILL_SCALEThe hunk fill band; the lightest of the three.- See Also:
-
-
Method Details
-
borderColor
-
interpolate
-