Skip to content

Commit ddf088d

Browse files
default full alpha
1 parent 8a9b66a commit ddf088d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

flixel/util/FlxColor.hx

+5-5
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ abstract FlxColor(Int) from Int from UInt to Int to UInt
456456
* @param Alpha How opaque the color should be, from 0 to 255
457457
* @return This color
458458
*/
459-
public inline function setRGB(Red:Int, Green:Int, Blue:Int, Alpha:Int = 255):FlxColor
459+
public inline function setRGB(Red:Int, Green:Int, Blue:Int, Alpha = 255):FlxColor
460460
{
461461
red = Red;
462462
green = Green;
@@ -474,7 +474,7 @@ abstract FlxColor(Int) from Int from UInt to Int to UInt
474474
* @param Alpha How opaque the color should be, from 0 to 1
475475
* @return This color
476476
*/
477-
public inline function setRGBFloat(Red:Float, Green:Float, Blue:Float, Alpha:Float = 1):FlxColor
477+
public inline function setRGBFloat(Red:Float, Green:Float, Blue:Float, Alpha = 1.0):FlxColor
478478
{
479479
redFloat = Red;
480480
greenFloat = Green;
@@ -493,7 +493,7 @@ abstract FlxColor(Int) from Int from UInt to Int to UInt
493493
* @param Alpha How opaque the color should be, from 0 to 1
494494
* @return This color
495495
*/
496-
public inline function setCMYK(Cyan:Float, Magenta:Float, Yellow:Float, Black:Float, Alpha:Float = 1):FlxColor
496+
public inline function setCMYK(Cyan:Float, Magenta:Float, Yellow:Float, Black:Float, Alpha = 1.0):FlxColor
497497
{
498498
redFloat = (1 - Cyan) * (1 - Black);
499499
greenFloat = (1 - Magenta) * (1 - Black);
@@ -511,7 +511,7 @@ abstract FlxColor(Int) from Int from UInt to Int to UInt
511511
* @param Alpha How opaque the color should be, either between 0 and 1 or 0 and 255.
512512
* @return This color
513513
*/
514-
public inline function setHSB(Hue:Float, Saturation:Float, Brightness:Float, Alpha:Float):FlxColor
514+
public inline function setHSB(Hue:Float, Saturation:Float, Brightness:Float, Alpha = 1.0):FlxColor
515515
{
516516
var chroma = Brightness * Saturation;
517517
var match = Brightness - chroma;
@@ -527,7 +527,7 @@ abstract FlxColor(Int) from Int from UInt to Int to UInt
527527
* @param Alpha How opaque the color should be, either between 0 and 1 or 0 and 255
528528
* @return This color
529529
*/
530-
public inline function setHSL(Hue:Float, Saturation:Float, Lightness:Float, Alpha:Float):FlxColor
530+
public inline function setHSL(Hue:Float, Saturation:Float, Lightness:Float, Alpha = 1.0):FlxColor
531531
{
532532
var chroma = (1 - Math.abs(2 * Lightness - 1)) * Saturation;
533533
var match = Lightness - chroma / 2;

0 commit comments

Comments
 (0)