Skip to content

Latest commit

 

History

History
393 lines (136 loc) · 2.23 KB

VBox.md

File metadata and controls

393 lines (136 loc) · 2.23 KB

VBox

  • Full name: \ColorThief\VBox

Properties

r1

public int $r1

r2

public int $r2

g1

public int $g1

g2

public int $g2

b1

public int $b1

b2

public int $b2

histo

public array<int,int> $histo

volume

private int $volume

volume_set

private bool $volume_set

count

private int $count

count_set

private bool $count_set

avg

private array $avg

avg_set

private bool $avg_set

Methods

__construct

VBox constructor.

public __construct(int $r1, int $r2, int $g1, int $g2, int $b1, int $b2, array<int,int> $histo): mixed

Parameters:

Parameter Type Description
$r1 int
$r2 int
$g1 int
$g2 int
$b1 int
$b2 int
$histo array<int,int>

volume

public volume(bool $force = false): int

Parameters:

Parameter Type Description
$force bool

count

public count(bool $force = false): int

Parameters:

Parameter Type Description
$force bool

copy

public copy(): self

avg

Calculates the average color represented by this VBox.

public avg(bool $force = false): array

Parameters:

Parameter Type Description
$force bool

contains

public contains(array $rgbValue, int $rshift = ColorThief::RSHIFT): bool

Parameters:

Parameter Type Description
$rgbValue array
$rshift int

longestAxis

Determines the longest axis.

public longestAxis(): string