FANDOM


V1Edit

Indications are, COLREAD in SmileBasic V1 is identical to that in V2.

V2Edit

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}.

V3Edit

No information on SmileBasic V3.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.