Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## toxi.color
Class ColorTheme

    java.lang.Object
      toxi.color.ColorTheme

    public class ColorTheme

extends java.lang.Object

A ColorTheme is a weighted collection of `ColorRange`s used to define custom palettes with a certain balance between individual colors/shades. New theme parts can be added via textual descriptors referring to one of the preset `ColorRange`s and/or `NamedColor`s: e.g. "warm springgreen". For each theme part a weight has to be specified. The magnitude of the weight value is irrelevant and is only important in relation to the weights of other theme parts. For example: Theme part A with a weight of 0.5 will only have 1/20 of the weight of theme part B with a weight of 5.0...

Constructor Summary
`ColorTheme(java.lang.String name)`

Method Summary
`ColorTheme` | `addRange(ColorRange range, ReadonlyTColor col, float weight)`
`ColorTheme` | `addRange(java.lang.String descriptor, float weight)`
`TColor` | `getColor()`
`ColorList` | `getColors(int num)` Creates a `ColorList` of `TColor`s based on the theme's ranges and balance defined by their weights
`java.lang.String` | `getName()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ColorTheme

    public ColorTheme(java.lang.String name)

Method Detail

### addRange

    public ColorTheme addRange(ColorRange range,
                               ReadonlyTColor col,
                               float weight)

### addRange

    public ColorTheme addRange(java.lang.String descriptor,
                               float weight)

### getColor

    public TColor getColor()

### getColors

    public ColorList getColors(int num)

  Creates a `ColorList` of `TColor`s based on the theme's ranges and balance defined by their weights

  Parameters:
    `num` - number of colors to create
  Returns:
    new list

### getName

    public java.lang.String getName()

  Returns:
    the theme's name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD