V1[]
Indications are, COLREAD
in SmileBasic V1 is identical to that in V2.
V2[]
COLREAD
is a command which reads colour information from the graphics system. It has four parameters, and the first is a pair of values in parentheses. The first value of the pair is a string, and should be "BG"
, "SP"
, or "GRP"
(anything else results in Illegal function call (COLREAD)
error). The second value of the pair is a number, which is rounded down to an integer, and the rounded value should be between 0 and 255 inclusive (anything else results in Out of range (COLREAD)
error). The second, third, and fourth parameters to the command are variable names, and those variables are assigned the red, green, and blue values corresponding to the colour specified.
As an example, the command
COLREAD ("BG",20),R,G,B
will typically cause the variable R
to get the value 33, the variable G
to get the value 57, and the variable B
to get the value 132. The default values are on the page List of default colours
The R, G, B values can be modified with the COLSET command to be anywhere between 0 up to (but not including) 256, however, the R
and B
variables will only ever be assigned a value from the following set of 32 values: {0, 8, 16, 25, 33, 41, 49, 58, 66, 74, 82, 90, 99, 107, 115, 123, 132, 140, 148, 156, 165, 173, 181, 189, 197, 206, 214, 222, 230, 239, 247, 255}, and the G
variable will only every be assigned a value from the following set of 64 values: {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 215, 219, 223, 227, 231, 235, 239, 243, 247, 251, 255}.
V3[]
No information on SmileBasic V3.