public void setColourRGB(Colour c,
int r,
int g,
int b) {
// Only colours on the standard palette with values 8-64 are acceptable
int pos = c.getValue() - 8;
if (pos < 0 || pos >= numColours)
{
return;
}
if (!initialized)
{
initialize();
}
// Force the colours into the range 0-255
r = setValueRange(r, 0, 0xff);
g = setValueRange(g, 0, 0xff);
b = setValueRange(b, 0, 0xff);
rgbColours[pos] = new RGB(r, g, b);
// Indicate that the palette has been modified
dirty = true;
}
Sets the RGB value for the specified colour for this workbook |