# Class: oPalette

## $. oPalette

$.oPalette Base Class

#### new $.oPalette(paletteObject, paletteListObject)

openHarmony/openHarmony_palette.js, line 65
  $.oPalette constructor.

  Name | Type | Description
  --- | --- | ---
  `paletteObject` | palette | The Harmony palette object.
  `paletteListObject` | paletteList | The Harmony paletteListObject object.

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `paletteObject` | palette | The Harmony palette object.
  `scene` | oSceneObject | The DOM Scene object.

### Members

#### colorsArray.<oColor>

  The oColor objects contained in the palette.

#### readonlyelement$.oElement

  The element containing the palette if stored in element folder.

#### idstring

  The palette ID.

#### indexint

  The palette index in the palette list.

#### namestring

  The palette name.

#### paletteStorage$.oFile

  The storage place for the palette (environment, scene, job, element or external)

#### path$.oFile

  The palette path on disk.

#### selectedbool

  Whether the palette is selected.

### Methods

#### addColor()

openHarmony/openHarmony_palette.js, line 267
  Not yet implemented.

#### getColorById(id)

openHarmony/openHarmony_palette.js, line 279
  Gets a oColor object based on id.

  Name | Type | Description
  --- | --- | ---
  `id` | string | the color id as found in toonboom palette file.

#### remove(removeFile)

openHarmony/openHarmony_palette.js, line 294
  Removes the palette file from the filesystem and palette list.

  Name | Type | Description
  --- | --- | ---
  `removeFile` | bool | Whether the palette file should be removed on the filesystem.