Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class Palette

java.lang.Object
  extended by com.aspose.cells.Palette

public final class Palette
extends java.lang.Object

Represents the palette of an Workbook file. It can accomodate 56 colors. Note that it will not take effect if you use a color that is not in the palette. To use a custom color, please put it into the palette first. The following is the standard color palette.

Color Red Green Blue
Black000
White255255255
Red25500
Lime02550
Blue00255
Yellow2552550
Magenta2550255
Cyan0255255
Maroon12800
Green01280
Navy00128
Olive1281280
Purple1280128
Teal0128128
Silver192192192
Gray128128128
Color17153153255
Color1815351102
Color19255255204
Color20204255255
Color211020102
Color22255128128
Color230102204
Color24204204255
Color2500128
Color262550255
Color272552550
Color280255255
Color291280128
Color3012800
Color310128128
Color3200255
Color330204255
Color34204255255
Color35204255204
Color36255255153
Color37153204255
Color38255153204
Color39204153255
Color40255204153
Color4151102255
Color4251204204
Color431532040
Color442552040
Color452551530
Color462551020
Color47102102153
Color48150150150
Color49051102
Color5051153102
Color510510
Color5251510
Color53153510
Color5415351102
Color555151153
Color56515151


Method Summary
 Color getColor(int index)
          Gets the color in the palette at the specified index(0-55).
 Color[] getColors()
          Gets all colors in the palette.
 void setColor(int index, Color color)
          Sets the color in the palette at the specified index(0-55).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getColor

public final Color getColor(int index)
Gets the color in the palette at the specified index(0-55).

Parameters:
index - the color index in the palette.
Returns:
the color at the specified index.
Throws:
java.lang.IllegalArgumentException - if index is out of range.

setColor

public final void setColor(int index,
                           Color color)
Sets the color in the palette at the specified index(0-55).

Parameters:
index - the color index in the palette.
color - the color
Throws:
java.lang.IllegalArgumentException - if index is out of range, or color is null.

getColors

public Color[] getColors()
Gets all colors in the palette.

Returns:
all colors in the palette.