Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Color

Fonctions membres publiques

 __construct (string $foreground='', string $background='', array $options=[])
 
 apply (string $text)
 
 set ()
 
 unset ()
 

Fonctions membres privées

 parseColor (string $color, bool $background=false)
 
 convertHexColorToAnsi (int $color)
 
 degradeHexColorToAnsi (int $r, int $g, int $b)
 
 getSaturation (int $r, int $g, int $b)
 

Attributs privés

const COLORS
 
const const BRIGHT_COLORS
 
const const const AVAILABLE_OPTIONS
 
const const const $foreground
 
 $background
 
 $options = []
 

Description détaillée

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( string  $foreground = '',
string  $background = '',
array  $options = [] 
)

Documentation des fonctions membres

◆ apply()

apply ( string  $text)

◆ convertHexColorToAnsi()

convertHexColorToAnsi ( int  $color)
private

◆ degradeHexColorToAnsi()

degradeHexColorToAnsi ( int  $r,
int  $g,
int  $b 
)
private

Références $b, $g, $r, et Color\getSaturation().

Référencé par Color\convertHexColorToAnsi().

◆ getSaturation()

getSaturation ( int  $r,
int  $g,
int  $b 
)
private

Références $b, $g, et $r.

Référencé par Color\degradeHexColorToAnsi().

◆ parseColor()

parseColor ( string  $color,
bool  $background = false 
)
private

Références Color\$background, et $color.

Référencé par Color\__construct().

◆ set()

set ( )

◆ unset()

unset ( )

Références $option.

Documentation des champs

◆ $background

$background
private

◆ $foreground

const const const $foreground
private
Valeur initiale :
=> 22],
'underscore' => ['set' => 4, 'unset' => 24],
'blink' => ['set' => 5, 'unset' => 25],
'reverse' => ['set' => 7, 'unset' => 27],
'conceal' => ['set' => 8, 'unset' => 28],
]

Référencé par Color\__construct(), et Color\set().

◆ $options

$options = []
private

Référencé par Color\__construct().

◆ AVAILABLE_OPTIONS

const const const AVAILABLE_OPTIONS
private
Valeur initiale :
= [
'bold' => ['set' => 1

◆ BRIGHT_COLORS

const const BRIGHT_COLORS
private
Valeur initiale :
= [
'gray' => 0

◆ COLORS

const COLORS
private
Valeur initiale :
= [
'black' => 0

La documentation de cette classe a été générée à partir du fichier suivant :