| java.lang.Object org.eclipse.ui.internal.themes.RGBContrastFactory
RGBContrastFactory | public class RGBContrastFactory implements IColorFactory,IExecutableExtension(Code) | | A IColorFactory that may be used to select a colour with
a higher contrast. The colors to blend are specified as per method
number two in
org.eclipse.core.runtime.IExecutableExtension .
Example usage:
<colorDefinition
label="Red/Blue Contrast"
id="example.redblueblend">
<colorFactory
plugin="org.eclipse.ui"
class="org.eclipse.ui.internal.themes.RGBContrastFactory">
<parameter name="foreground" value="0,0,0" />
<parameter name="background1" value="COLOR_RED" />
<parameter name="background2" value="COLOR_BLUE" />
</colorFactory>
</colorDefinition>
This will select whichever of Red or Blue has a higher contrst with black.
The color values may be specified as RGB triples or as SWT constants.
See Also: org.eclipse.swt.SWT since: 3.0 |
Method Summary | |
public RGB | createColor() | double | lightness(RGB color) Returns a measure of the lightness in the perceptual colourspace
IPT. | public void | setInitializationData(IConfigurationElement config, String propertyName, Object data) This executable extension requires parameters to be explicitly declared
via the second method described in the IExecutableExtension
documentation. | double | voltage_to_intensity_srgb(double val) Returns the intensity of an RGB component using the
sRGB gamma function.
Parameters: val - Value to convert. |
createColor | public RGB createColor()(Code) | | |
lightness | double lightness(RGB color)(Code) | | Returns a measure of the lightness in the perceptual colourspace
IPT.
Parameters: color - The colour in sRGB Lightness in IPT space. |
setInitializationData | public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException(Code) | | This executable extension requires parameters to be explicitly declared
via the second method described in the IExecutableExtension
documentation. This class expects that there will be three parameters,
foreground , background1 and
background2 , that describe the two colors to be blended.
These values may either be RGB triples or SWT constants.
See Also: org.eclipse.core.runtime.IExecutableExtension.setInitializationData(org.eclipse.core.runtime.IConfigurationElementjava.lang.Stringjava.lang.Object) |
voltage_to_intensity_srgb | double voltage_to_intensity_srgb(double val)(Code) | | Returns the intensity of an RGB component using the
sRGB gamma function.
Parameters: val - Value to convert. Light intensity of the component. |
|
|