RB LOOKUPCOLOR

From MCS Wiki AVR
Jump to: navigation, search

Contents

Action

Returns the RGB color information from a data table using an index.

 

 

Syntax

Color = RB_LOOKUPCOLOR(  Index [, Label] )

 

 

Remarks

Index

A byte variable or constant that holds the index of the table.

The table need to be identified by a label. This is either a user defined label, or a label named RAINBOW_COLORS

The table has the R, G, B format. Example:

 

Rainbow_Colors:

         ' R ,    G ,      B      index

Data &HFF , &H00 , &H00 'Red 0

Data &H00 , &HFF , &H00 'Green 1

Data &H00 , &H00 , &HFF 'Blue 2

Data &HFF , &HA5 , &H00 'Orange 3

Data &HFF , &HFF , &H00 'Yellow 4

Data &HFF , &H69 , &HB4 'HotPink 5

Label

The label name of the table. This is an optional value. If the label name is not specified, the name RAINBOW_COLORS will be used.

 

 

RB_LOOKUP is a help function. It does not work on the memory or LED's. I just returns a color from a data table using a lookup value.

See also

RB_ADDCOLOR , RB_ANDCOLOR , RB_ORCOLOR, RB_SUBCOLOR, RB_CLEARSTRIPE , RB_CLEARCOLORS , RB_FILL , RB_FILLCOLORS , RB_FILLSTRIPE , RB_SELECTCHANNEL , RB_SEND, RB_SETCOLOR , RB_SWAPCOLOR , RB_ROTATELEFT , RB_ROTATERIGHT , RB_SHIFTLEFT , RB_SHIFTRIGHT , RB_CHANGEPIN , RB_SETTABLECOLOR , RB_GETCOLOR , RB_LOOKUPCOLOR


Example

See RB_CHANGEPIN


Languages   English  
Personal tools
Namespaces
Variants
Actions
Navigation
Language