The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Interpolate3Colors


Unit:SDL_sdlcolors
Class:none
Declaration:function Interpolate3Colors (Cl1, Cl2, Cl3: TColor; Level: double): TColor;

The function Interpolate3Colors calculates an interpolated color between the three predefined colors cl1, cl2 and cl3. The parameter Level which may vary between 0.0 and 1.0 controls how the three colors are mixed. A zero value returns color cl1, a value of 0.5 returns color cl2, and a value of 1.0 returns cl3, any value between returns a mixed color.

Example: The following color bar has been created using the call "Interpolate3Colors (clRed, clBlue, clLime, Level)" with Level varying from 0.0 (red at left) to 1.0 (light green at right).



Last Update: 2015-May-11