‪Aspose.Barcode for PHP via Java  24.7
‪Aspose.Barcode for PHP via Java Generation and Recognition API docs
HslaColor Class Reference

Public Member Functions

 __construct (int $h, int $s, int $l, float $a)
 

Static Public Member Functions

static convertHslaToRgba (HslaColor $hslaColor)
 

Public Attributes

 $H
 
 $S
 
 $L
 
 $A = 0.0
 

Detailed Description

Class for representing HSLA color (Hue, Saturation, Lightness, Alpha)

Constructor & Destructor Documentation

◆ __construct()

HslaColor::__construct ( int  $h,
int  $s,
int  $l,
float  $a 
)

Constructor for HslaColor

Parameters
$h‪Hue [0, 360]
$s‪Saturation [0, 100]
$l‪Lightness [0, 100]
$a‪Alpha (opacity) [0.0f, 1.0f]

Member Function Documentation

◆ convertHslaToRgba()

static HslaColor::convertHslaToRgba ( HslaColor  $hslaColor)
static

Uses https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB

Parameters
hslaColor‪HSLA color to convert
Returns
‪string with RGBA values

Member Data Documentation

◆ $A

HslaColor::$A = 0.0

Alpha (opacity) [0.0f, 1.0f]

◆ $H

HslaColor::$H

Hue [0, 360]

◆ $L

HslaColor::$L

Lightness [0, 100]

◆ $S

HslaColor::$S

Saturation [0, 100]