# Class FieldAssistColors

java.lang.Object
org.eclipse.jface.fieldassist.FieldAssistColors

@Deprecated(forRemoval=true, since="2026-03") public class FieldAssistColors extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
As of 3.3, this class is no longer necessary.
FieldAssistColors defines protocol for retrieving colors that can be used to provide visual cues with fields. For consistency with JFace dialogs and wizards, it is recommended that FieldAssistColors is used when colors are used to annotate fields.

Color resources that are returned using methods in this class are maintained in the JFace color registries, or by SWT. Users of any color resources provided by this class are not responsible for the lifecycle of the color. Colors provided by this class should never be disposed by clients. In some cases, clients are provided information, such as RGB values, in order to create their own color resources. In these cases, the client should manage the lifecycle of any created resource.

Since:
  3.2

## Constructor Summary

Constructors
Constructor
Description
`FieldAssistColors()`
Deprecated, for removal: This API element is subject to removal in a future version.

## Method Summary

Modifier and Type
Method
Description
`static RGB`
`computeErrorFieldBackgroundRGB(Control control)`
Deprecated, for removal: This API element is subject to removal in a future version.
`static Color`
`getRequiredFieldBackgroundColor(Control control)`
Deprecated, for removal: This API element is subject to removal in a future version.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FieldAssistColors

public FieldAssistColors()
Deprecated, for removal: This API element is subject to removal in a future version.

## Method Details

### computeErrorFieldBackgroundRGB

@Deprecated(forRemoval=true, since="2026-03") public static RGB computeErrorFieldBackgroundRGB(Control control)
Deprecated, for removal: This API element is subject to removal in a future version.
Compute the RGB of the color that should be used for the background of a control to indicate that the control has an error. Because the color suitable for indicating an error depends on the colors set into the control, this color is always computed dynamically and provided as an RGB value. Clients who use this RGB to create a Color resource are responsible for managing the life cycle of the color.

This color is computed dynamically each time that it is queried. Clients should typically call this method once, create a color from the RGB provided, and dispose of the color when finished using it.

Parameters:
  `control` - the control for which the background color should be computed.
Returns:
  the RGB value indicating a background color appropriate for indicating an error in the control.

### getRequiredFieldBackgroundColor

@Deprecated(forRemoval=true, since="2026-03") public static Color getRequiredFieldBackgroundColor(Control control)
Deprecated, for removal: This API element is subject to removal in a future version.
Return the color that should be used for the background of a control to indicate that the control is a required field and does not have content.

This color is managed by FieldAssistResources and should never be disposed by clients.

Parameters:
  `control` - the control on which the background color will be used.
Returns:
  the color used to indicate that a field is required.