CaMykS  1.0-20250801
Public Member Functions | Private Attributes | List of all members
CColor Class Reference

Color object. More...

Public Member Functions

 __construct ($value=null)
 
 __get ($variableName)
 
 set ($value=null)
 
 get_asHexa ($withHash=true)
 
 get_asRGB ($associative=true)
 
 get_asRGBA ($associative=true)
 
 is_identical ($color, $checkAlpha=true)
 
 is_transparent ()
 

Private Attributes

 $red = 255
 Red value. More...
 
 $green = 255
 Green value. More...
 
 $blue = 255
 Blue value. More...
 
 $alpha = 0
 Alpha value. More...
 

Detailed Description

Color object.

Engine / Object Library

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Version
1.0.0.1
Date
Creation: Apr 2024
Modification: Jul 2025
Note
This program is distributed as is - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. CColor class.

Constructor & Destructor Documentation

◆ __construct()

CColor::__construct (   $value = null)

Object constructor.

Parameters
mixed$value

Member Function Documentation

◆ __get()

CColor::__get (   $variableName)

Makes some variables accessible in read-only

Parameters
string$variableName
Returns
mixed

◆ set()

CColor::set (   $value = null)

Define color value.

Parameters
mixed$value
Returns
boolean success

◆ get_asHexa()

CColor::get_asHexa (   $withHash = true)

Return color as hexadecimal value.

Parameters
boolean$withHash
Returns
string

◆ get_asRGB()

CColor::get_asRGB (   $associative = true)

Return color as RGB array value.

Parameters
boolean$associative
Returns
array

◆ get_asRGBA()

CColor::get_asRGBA (   $associative = true)

Return color as RGBA array value.

Parameters
boolean$associative
Returns
array

◆ is_identical()

CColor::is_identical (   $color,
  $checkAlpha = true 
)

Check color is identical to given one.

Parameters
mixed$color
boolean$checkAlpha
Returns
boolean

◆ is_transparent()

CColor::is_transparent ( )

Check color is transparent.

Returns
boolean

Member Data Documentation

◆ $red

integer CColor::$red = 255
private

Red value.

◆ $green

integer CColor::$green = 255
private

Green value.

◆ $blue

integer CColor::$blue = 255
private

Blue value.

◆ $alpha

integer CColor::$alpha = 0
private

Alpha value.


The documentation for this class was generated from the following file: