Color.this
- this(Device device)
- this(Device device, int red, int green, int blue)
- this(Device device, int red, int green, int blue, int alpha)
- this(Device device, RGB rgb)
- this(Device device, RGBA rgba)
- this(Device device, RGB rgb, int alpha)
org eclipse swt graphics Color Color
aliasesconstructorsfunctionsstatic functionsvariables
Constructs a new instance of this class given a device and an <code>RGBA</code> describing the desired red, green, blue & alpha values. On limited color devices, the color instance created by this call may not have the same RGBA values as the ones specified by the argument. The RGBA values on the returned instance will be the color values of the operating system color + alpha. <p> You must dispose the color when it is no longer required. </p>
@param device the device on which to allocate the color @param rgba the RGBA values of the desired color. Currently, SWT only honors extreme values for alpha i.e. 0 (transparent) or 255 (opaque).
@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> <li>ERROR_NULL_ARGUMENT - if the rgba argument is null</li> <li>ERROR_INVALID_ARGUMENT - if the red, green, blue or alpha components of the argument are not between 0 and 255</li> </ul>
@see #dispose @since 3.104