phan updates
This commit is contained in:
@@ -562,7 +562,7 @@ class Color
|
|||||||
* convert rgb to OkLch
|
* convert rgb to OkLch
|
||||||
* via rgb -> linear rgb -> xyz D65 -> OkLab -> OkLch
|
* via rgb -> linear rgb -> xyz D65 -> OkLab -> OkLch
|
||||||
*
|
*
|
||||||
* @param RGB $rbh
|
* @param RGB $rgb
|
||||||
* @return LCH
|
* @return LCH
|
||||||
*/
|
*/
|
||||||
public static function rgbToOkLch(RGB $rgb): LCH
|
public static function rgbToOkLch(RGB $rgb): LCH
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class Lab implements Interface\CoordinatesInterface
|
|||||||
* Color Coordinate: Lab
|
* Color Coordinate: Lab
|
||||||
* for oklab or cie
|
* for oklab or cie
|
||||||
*
|
*
|
||||||
* @param string|array{0:float,1:float,2:float} $rgb
|
* @param string|array{0:float,1:float,2:float} $colors
|
||||||
* @param string $colorspace [default='']
|
* @param string $colorspace [default='']
|
||||||
* @param array<string,string> $options [default=[]]
|
* @param array<string,string> $options [default=[]]
|
||||||
* @throws \InvalidArgumentException only array colors allowed
|
* @throws \InvalidArgumentException only array colors allowed
|
||||||
@@ -62,7 +62,7 @@ class Lab implements Interface\CoordinatesInterface
|
|||||||
* set from array
|
* set from array
|
||||||
* where 0: Lightness, 1: a, 2: b
|
* where 0: Lightness, 1: a, 2: b
|
||||||
*
|
*
|
||||||
* @param array{0:float,1:float,2:float} $rgb
|
* @param array{0:float,1:float,2:float} $colors
|
||||||
* @param string $colorspace [default='']
|
* @param string $colorspace [default='']
|
||||||
* @param array<string,string> $options [default=[]]
|
* @param array<string,string> $options [default=[]]
|
||||||
* @return self
|
* @return self
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class XYZ implements Interface\CoordinatesInterface
|
|||||||
/**
|
/**
|
||||||
* parse options
|
* parse options
|
||||||
*
|
*
|
||||||
* @param array<string,bool> $options
|
* @param array<string,string> $options
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
private function parseOptions(array $options): self
|
private function parseOptions(array $options): self
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class Colors
|
|||||||
$rgbArray = [];
|
$rgbArray = [];
|
||||||
// rewrite to previous r/g/b key output
|
// rewrite to previous r/g/b key output
|
||||||
foreach ((new Coordinates\RGB($hex_string))->returnAsArray() as $p => $el) {
|
foreach ((new Coordinates\RGB($hex_string))->returnAsArray() as $p => $el) {
|
||||||
|
$k = '';
|
||||||
switch ($p) {
|
switch ($p) {
|
||||||
case 0:
|
case 0:
|
||||||
$k = 'r';
|
$k = 'r';
|
||||||
|
|||||||
@@ -137,10 +137,10 @@ class Math
|
|||||||
*
|
*
|
||||||
* It returns an array which is the product of the two number matrices passed as parameters.
|
* It returns an array which is the product of the two number matrices passed as parameters.
|
||||||
*
|
*
|
||||||
* @param array<array<int|float>> $a m x n matrice
|
* @param array<float|int|array<int|float>> $a m x n matrice
|
||||||
* @param array<array<int|float>> $b n x p matrice
|
* @param array<float|int|array<int|float>> $b n x p matrice
|
||||||
*
|
*
|
||||||
* @return array<array<int|float>> m x p product
|
* @return array<float|int|array<int|float>> m x p product
|
||||||
*/
|
*/
|
||||||
public static function multiplyMatrices(array $a, array $b): array
|
public static function multiplyMatrices(array $a, array $b): array
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user