User Tools

Site Tools


mixcolors.htm
Navigation:  »No topics above this level«====== MixColors ====== Return to chapter overview

MixColors( Color1, Color2, Percentage ),LONG

Color1 A LONG value that represents a valid RGB composite color to be mixed with the second color (color1)
Color2 A LONG value that represents a valid RGB composite color to be mixed with the first color (color1)
percentage A BYTE value that represents the percentage of mix applied to the two colors.

blk2blue.jpg

The MixColors method is a PROTECTED method used to calculate and return a composite mix of two colors with a given percentage of mix.

Each color passed to this method is a RGB composite color extracted as follows:

InputColor  LONG

RGBT1       GROUP,OVER(InputColor)

R            BYTE

G            BYTE

B            BYTE

NotUsed      BYTE

           END

The mixing of colors is applied using the following formula to all RGB elements:

(RGBT1.R + 1)

Return Value:   LONG

Implementation:

The MIxColors method is used by the SetThemeColors method to detect and set the proper theme menu style color based on the active theme detected.

See Also: SetThemeColors ( set colors based on theme detected )

1)
RGBT2.R - RGBT1.R) * pPercentageMix/100
mixcolors.htm.txt · Last modified: 2019/11/13 16:57 by 127.0.0.1