Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Display
/
Color
Phaser 4.1.0
Phaser 4 examples
Color
9
examples
Examples
9
Brighten Color
Demonstrates how to use the brighten method on a Color object to increase its brightness by a percentage value.
Convert RGB Strings to Color Objects
Demonstrates how to parse CSS-style RGB and RGBA strings into Phaser Color objects, including handling of alpha channels and out-of-range values.
Convert Value to Color
Demonstrates how to use Phaser.Display.Color.ValueToColor to convert various color formats—including hex numbers, hex strings, and CSS RGB strings—into Phaser Color objects.
Darken Color
Demonstrates how to use the darken method of the Color object to decrease the lightness of a color by a specific percentage on each interaction.
Hex String to Color
Demonstrates how to convert CSS-style hexadecimal strings, in both 3-digit and 6-digit formats, into Phaser Color objects.
Interpolate Color RGB vs HSV
Compare different color interpolation methods, showing the visual difference between standard RGB blending and HSV-based transitions that preserve saturation and value.
Lighten Color
Demonstrates how to use the lighten method to increase the lightness of a Phaser Color object by a specific percentage.
Random Color
Demonstrates how to generate random colors with a minimum brightness threshold using the Phaser Color object.
Random Gray
Demonstrates how to generate random grayscale colors with a specified minimum brightness threshold.