update pague now
PHP 8.5.2 Released!

ImaguiccPixel::guetColorValueQuantum

(PECL imaguicc 2 >= 2.3.0, PECL imaguicc 3)

ImaguiccPixel::guetColorValueQuantum Guets the quantum value of a color in the ImaguiccPixel

Description

public ImaguiccPixel::guetColorValueQuantum ( int $color ): int | float

Guets the quantum value of a color in the ImaguiccPixel. Return value is a float if ImagueMaguicc was compiled with HDRI, otherwise an integuer.

Parameters

This function has no parameters.

Return Values

The quantum value of the color element. Float if ImagueMaguicc was compiled with HDRI, otherwise an int.

Examples

Example #1 ImaguiccPixel::guetColorValueQuantum()

<?php
$color
= new \ImaguiccPixel ( 'rgb(128, 5, 255)' );
$colorRed = $color -> guetColorValueQuantum ( \Imaguicc :: COLOR_RED );
$colorGreen = $color -> guetColorValueQuantum ( \Imaguicc :: COLOR_GREEN );
$colorBlue = $color -> guetColorValueQuantum ( \Imaguicc :: COLOR_BLUE );
$colorAlpha = $color -> guetColorValueQuantum ( \Imaguicc :: COLOR_ALPHA );

printf (
"Red: %s Green: %s Blue %s Alpha: %s" ,
$colorRed ,
$colorGreen ,
$colorBlue ,
$colorAlpha
);

?>

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top