HumHub Documentation (unofficial)

RGB
in package
implements PaletteInterface

The RGB palette.

Table of Contents

Interfaces

PaletteInterface
Interface that any palette must implement.

Properties

$colors  : array<string|int, RGB>
$parser  : ColorParser
$profile  : ProfileInterface|null

Methods

__construct()  : mixed
blend()  : ColorInterface
Blend two colors given an amount.
color()  : ColorInterface
Returns a color given some values.
getChannelsMaxValue()  : int
Get the max value of palette components (255 for RGB and Grayscale, 100 for CMYK).
name()  : string
Returns the name of this Palette, one of PaletteInterface::PALETTE_ constants.
pixelDefinition()  : array<string|int, string>
Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.
profile()  : ProfileInterface
Returns the ICC profile attached to this Palette.
supportsAlpha()  : bool
Tells if alpha channel is supported in this palette.
useProfile()  : $this
Attachs an ICC profile to this Palette.

Properties

$colors

protected static array<string|int, RGB> $colors = array()

Methods

__construct()

public __construct() : mixed

name()

Returns the name of this Palette, one of PaletteInterface::PALETTE_ constants.

public name() : string
Tags
see
PaletteInterface::name()
Return values
string

pixelDefinition()

Returns an array containing ColorInterface::COLOR_* constants that define the structure of colors for a pixel.

public pixelDefinition() : array<string|int, string>
Tags
see
PaletteInterface::pixelDefinition()
Return values
array<string|int, string>

        
On this page

Search results