part_type_colour_hsv

Set the particle colour from a hue, saturation and value range.

Syntax:

part_type_colour_hsv(ind, hmin, hmax, smin, smax, vmin, vmax);


Argument Description
ind The index of the particle type to change.
hmin The minimum the final colour's hue component can be.
hmax The maximum the final colour's hue component can be.
smin The minimum the final colour's saturation component can be.
smax The maximum the final colour's saturation component can be.
vmin The minimum the final colour's value component can be.
vmax The maximum the final colour's value component can be.


Returns: N/A


Description

With this function you can set a hue, saturation and value range for all particles of the given type. You supply a minimum value and a maximum value for each of the three components and the particles created will have a random colour based on the given range of parameters. In this way you can create particles of the same hue but different saturations, or of different hues but the same value (luminosity) etc... All values must be between 0 and 255.


Example:

part_type_hsv(global.Stars, 0, 255, 0, 255, 255, 255 );

The above code sets each particle emitted of the particle type indexed in the global variable "Stars" to have different colours and saturations, but the same value (luminosity).


Back: Particle Types
Next: part_type_colour_mix
© Copyright YoYo Games Ltd. 2015 All Rights Reserved