Thanks for clearing my somewhat muddled thoughts
Using the Enterprise Colours Scheme is a simple and convenient way of selecting a colour. A very nice program....
However here is my task:
I want to use the BIAS set, where there is a colour mixed from RED (3) and GREEN (3) and BLUE (0). The bit pattern for this colour is:
00011011 = 27
As ergoGnomics describes in his mail, the top 5 bits (00011) translates into the BIAS set number and the low 3 bits provides the index of the colour in the BIAS set.
00011 = 3 (That is BIAS set 3).
011 = 3 (Colour in BIAS set).
A set has 8 colours, so for instance colour 8-15 are members of set 1. So you have to multiply the set number with 8 to get a number within that set. And as the 8 colours from a set are mapped to palette colour 8-15 you have to add 8 to the index of the colour in the set when specifying your ink.
Here is some code, that demonstrates how it works.
100 PROGRAM "a:biastest.bas"
110 GRAPHICS HIRES 16
120 LET BIAS_NO = 3
130 LET COL_NO = 3
140 SET BIAS BIAS_NO * 8
150 SET INK COL_NO + 8
160 SET BEAM OFF
170 PLOT 100,100; 300,100; 300,200; 100,200; 100,100, 200,150, PAINT
The cool thing is that the bit pattern for the number of the colour also implicitly has information about the intensity of the RGB colours used to mix it, as well as information about BIAS sets and colours. So knowing any of the three facts can be used to deduce the others.
And yes, on second thoughts I don't understand the RGB function either
regard
Jesper