Eclipse Platform
Release 3.2

org.eclipse.ui.themes
Class ColorUtil

java.lang.Object
  extended byorg.eclipse.ui.themes.ColorUtil

public final class ColorUtil
extends Object

Useful color utilities.

Since:
3.0 - initial release, 3.2 - public API

Method Summary
static RGB blend(RGB val1, RGB val2)
          Blend the two color values returning a value that is halfway between them.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

blend

public static RGB blend(RGB val1,
                        RGB val2)
Blend the two color values returning a value that is halfway between them.

Parameters:
val1 - the first value
val2 - the second value
Returns:
the blended color

getColorValue

public static RGB getColorValue(String rawValue)
Get the RGB value for a given color.

Parameters:
rawValue - the raw value, either an RGB triple or an SWT constant name
Returns:
the RGB value

getColorValues

public static RGB[] getColorValues(String[] rawValues)
Get the RGB values for a given color array.

Parameters:
rawValues - the raw values, either RGB triple or an SWT constant
Returns:
the RGB values

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.