part_type_colour_hsv

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

Syntax:

GML Code Example

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:

GML Code 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).





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here