Using Color Table |
Print Previous Next |
Functions Provided For Using The Color Table Some effects provide more than one color. In this case the so-called Color Table (described here), »Using Color Gradient, »Using Color Gradient Dialog or »Using M2L Color Table is offered by the effect to take control of the colors.
The following table provides an overview of all functions the effect can use to modify the colors in a Color Table:
Remarks Not every function might be available for each MADRIX Effect. Also, some MADRIX effects require at least 2 entries in the Color Table. You will not able to overwrite this requirement with a Macro. In some MADRIX effects you cannot add or delete the number of colors, only the colors itself.
MADRIX 2.X To MADRIX 3.X Migration Hints The following functions are not supported anymore. Please follow the hints to migrate your macros.
Example This example ensures the amount of 6 colors in the Color Table and sets this 6 colors to defined values. The color Fade mode and the COLOR_MODE_LOOP are set. This example works with the »SCE Color Change or »SCE Color Scroll effect, for example. @scriptname=""; @author=""; @version=""; @description="";
//Colors color c1 = {255,0,0}; //red color c2 = {0,255,0}; //green color c3 = {0,0,255}; //blue
void InitEffect() { //remove all colors from list until the amount of colors is 6 while(ColorTableGetColorCount() > 6) ColorTableRemoveColor(0);
//add colors to list until the amount of colors is 6 while(ColorTableGetColorCount() < 6) ColorTableAddColor(0,WHITE);
//set colors ColorTableSetColor(0,c1); ColorTableSetColor(1,c2); ColorTableSetColor(2,c3); ColorTableSetColor(3,YELLOW); ColorTableSetColor(4,ORANGE); ColorTableSetColor(5,PINK);
//activate color fade mode ColorTableSetColorFade(true);
//set color mode to COLOR_MODE_LOOP ColorTableSetColorMode(COLOR_MODE_LOOP);
}
void PreRenderEffect() { }
void PostRenderEffect() { }
void MatrixSizeChanged() { InitEffect(); }
|
MADRIX Version: 3.6j | Script Version: 2.22 |
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100% |
Print Previous Next |