The Palette class Palette is a resource object that stores organised color data. It's purpose is to allow artists to save colors and store them.
An example for printing all the palettes and the entries:
Methods
Member documentation
Parameters
resource | (no description provided) |
Return
(no description provided) |
add a color entry to a group. Color is appended to the end.
Parameters
entry | the entry |
groupName | the name of the group to add to. |
Palette content can be organized in groups. This method allows to add a new group in palette.
Parameters
name | The name of the new group to add. |
change the group name.
DEPRECATED: use `renameGroup()` instead
Parameters
oldGroupName | the old groupname to change. |
newGroupName | the new name to change it into. |
Return
whether successful. Reasons for failure include not knowing have oldGroupName |
get the colorsetEntry from the global index.
DEPRECATED: use `entryByIndex()` instead
Parameters
index | the global index |
Return
the colorset entry |
DEPRECATED: use `entryByIndexFromGroup()` instead
Parameters
index | index in the group. |
groupName | the name of the group to get the color from. |
Return
the colorsetentry. |
Parameters
name | of the group to check. Empty is the default group. |
Return
the amount of colors within that group. |
number of colors (swatches) in palette NOTE: same as `numberOfEntries()`
Return
total number of colors |
Palettes are defined in grids. The number of column define grid width. The number of rows will depend of columns and total number of entries.
Return
the number of columns this palette is set to use. |
the comment or description associated with the palette.
Return
A string for which value contains the comment/description of palette. |
get color (swatch) from the global index.
Parameters
index | the global index |
Return
The Swatch color for given index. |
get color (swatch) from the given group index.
Parameters
index | index in the group. |
groupName | the name of the group to get the color from. |
Return
The Swatch color for given index within given group name. |
Palette content can be organized in groups.
Return
The list of group names (list of string). This list follow the order the groups are defined in palette. |
Move the group `groupName` to position before group `groupNameInsertBefore`.
Parameters
groupName | group to move. |
groupNameInsertBefore | reference group for which `groupName` have to be moved before. |
number of colors (swatches) in palette NOTE: same as `colorsCountTotal()`
Return
total number of colors |
remove from defined group a color entry designed by given index.
Parameters
index | index in the group. |
groupName | the name of the group within which color have to be removed. |
Palette content can be organized in groups. This method allows to remove an existing group from palette.
Parameters
name | The name of the new group to remve. |
keepColors | whether or not to delete all the colors inside, or to move them to the default group. |
rename a group
Parameters
oldGroupName | the old groupname to change. |
newGroupName | the new name to change it into. |
the palette
WARNING: this method does nothing and need to be implemented!
Return
always False |
Palettes are defined in grids. The number of column define grid width, this value can be defined. The number of rows will depend of columns and total number of entries.
Parameters
columns | Set the amount of columns this palette should use. |
the comment or description associated with the palette.
Parameters
comment | set the comment or description associated with the palette. |