Package net.sourceforge.jiu.color

# Class WebsafePaletteCreator

java.lang.Object
net.sourceforge.jiu.color.WebsafePaletteCreator

All Implemented Interfaces:
  `RGBIndex`

public class WebsafePaletteCreator extends Object implements RGBIndex
This class creates `Palette` objects that contain the so-called websafe palette. This palette has 216 entries which are uniformly spread over the RGB color cube. Each component (red / green / blue) takes each of the six values 0, 51, 101, 153, 204 and 255 (note that the difference is almost equal between two consecutive values, between 50 and 52). Therefore, the palette will have 63 = 6 * 6 * 6 = 216 entries.

This palette was designed with computer systems in mind that can only display 256 colors at a time. With the 216 colors that are uniformly spread over RGB color space, there is at least a somewhat similar match for each possible input color.

Since:
  0.5.0
Author:
  Marco Schmidt

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final int[]`
`SAMPLES`

### Fields inherited from interface net.sourceforge.jiu.data.RGBIndex

`INDEX_BLUE, INDEX_GREEN, INDEX_RED`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`private`
`WebsafePaletteCreator()`

## Method Summary

Modifier and Type
Method
Description
`static Palette`
`create()`
Creates a new palette with the 216 websafe colors.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### SAMPLES

private static final int[] SAMPLES

## Constructor Details

### WebsafePaletteCreator

private WebsafePaletteCreator()

## Method Details

### create

public static Palette create()
Creates a new palette with the 216 websafe colors.

Returns:
  new palette object