- 1.7
- 1.6
- 1.5
- Beta
- Examples (for 1.6a)
- Misc
Define colourscales to colour objects. Each colourscale has a number of points defining colours at specific values - between adjacent points the colour is linearly interpolated. Points in a colourscale are numbered from 1 onwards. There are ten available colourscales, with IDs 1-10. Some of these have specific uses within Aten.
![]() | See also: |
|---|---|
|
Syntax:
void addpoint( | scaleid, | |
| value, | ||
| r, | ||
| g, | ||
| b, | ||
a = 1.0); |
int | scaleid; |
double | value; |
double | r; |
double | g; |
double | b; |
double | a = 1.0; |
Adds a new point to the end of the specified colourscale, at the point value and with the RGB[A] colour provided.
For example:
addpoint(1, 15.0, 0.0, 1.0, 0.0);
adds a point to colourscale 1 at a value of 15.0 in a nasty green colour.
Syntax:
void clearpoints( | scaleid); |
int | scaleid; |
Clears all points from the specified colourscale.
For example:
clearpoints(3);
clears all points from the third colourscale.
Syntax:
void listscales( | ); |
Lists the current types, colours, and ranges of the colourscales
For example:
listscales();
Syntax:
void removepoint( | scaleid, | |
pointid); |
int | scaleid; |
int | pointid; |
Remove a single point from the selected colourscale.
For example:
removepoint(1,4);
deletes the fourth point from colourscale 1.
Syntax:
string scalename( | scaleid); |
int | scaleid; |
string scalename( | scaleid, | |
newname); |
int | scaleid; |
string | newname; |
Retrieves the name of the colourscale id provided, or sets the name if a new name is provided). The name is displayed next to the gradient bar (if drawn).
For example:
scalename(1, "Orientation");
renames the first colourscale to 'Orientation'.
Syntax:
void scalevisible( | scaleid, | |
visible); |
int | scaleid; |
bool | visible; |
Sets whether the gradient bar for the specified colourscale should be drawn in the main view. Default is 'off' for all colourscales.
For example:
scalevisible(9, "yes");
draws the gradient bar for the 9th colourscale in the main view.
Syntax:
void setpoint( | scaleid, | |
| pointid, | ||
| value, | ||
| r, | ||
| g, | ||
| b, | ||
a = 1.0); |
int | scaleid; |
int | pointid; |
double | value; |
double | r; |
double | g; |
double | b; |
double | a = 1.0; |
Sets the value and colour of an existing point in the specified colourscale.
For example:
setpoint(1, 2, -3.3, 1.0, 1.0, 1.0);
sets the second point on colourscale 1 to a value of -3.3 and white colour.
Syntax:
void setpointcolour( | scaleid, | |
| pointid, | ||
| r, | ||
| g, | ||
| b, | ||
a = 1.0); |
int | scaleid; |
int | pointid; |
double | r; |
double | g; |
double | b; |
double | a = 1.0; |
Sets the colour of an existing point in the specified colourscale.
For example:
setpointcolour(5, 1, 0.0, 0.0, 1.0);
sets the first point on colourscale 5 to be coloured blue.


![[Note]](images/note.png)