JHotDraw 7.4.1

org.jhotdraw.color
Interface ColorSystem

All Known Implementing Classes:
AbstractColorSystem, CMYKICCColorSystem, CMYKNominalColorSystem, HSLRGBColorSystem, HSLRYBColorSystem, HSVRGBColorSystem, HSVRYBColorSystem, RGBColorSystem

public interface ColorSystem

A ColorSystem defines a system to describe colors using a number of components. Each component has a normalized value between 0 and 1.

Author:
Werner Randelshofer  @version $Id: ColorSystem.java 527 2009-06-07 14:28:19Z rawcoder $

Method Summary
 int getComponentCount()
          Returns the number of color components used by the color system.
 float[] toComponents(int rgb, float[] components)
          Converts the specified color components to RGB.
 int toRGB(float... components)
          Converts the specified color components to RGB.
 

Method Detail

getComponentCount

int getComponentCount()
Returns the number of color components used by the color system.

Returns:
component count.

toRGB

int toRGB(float... components)
Converts the specified color components to RGB.

Parameters:
components - The color components.
Returns:
rgb value.

toComponents

float[] toComponents(int rgb,
                     float[] components)
Converts the specified color components to RGB.

Parameters:
rgb - value.
components - A component array for reuse.
Returns:
color components for the rgb value.

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.