public final class ColorUtil extends Object
Modifier and Type | Method and Description |
---|---|
static RGB |
blend(RGB val1,
RGB val2)
Blend the two color values returning a value that is halfway between
them.
|
static RGB |
blend(RGB c1,
RGB c2,
int ratio)
Blends the two color values according to the provided ratio.
|
static RGB |
getColorValue(String rawValue)
Get the RGB value for a given color.
|
static RGB[] |
getColorValues(String[] rawValues)
Get the RGB values for a given color array.
|
public static RGB blend(RGB c1, RGB c2, int ratio)
c1
- first colorc2
- second colorratio
- percentage of the first color in the blend (0-100)public static RGB blend(RGB val1, RGB val2)
val1
- the first valueval2
- the second valuepublic static RGB getColorValue(String rawValue) throws DataFormatException
rawValue
- the raw value, either an RGB triple or an SWT constant nameDataFormatException
- thrown if the value cannot be interpreted as a color
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.