Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Color

Class Color

Color helper

Create color contrasts and convert color values to various formats

Package: minPHP\helpers\color
Located at helpers/color/color.php

Methods summary

public Color
# hex( string $color )

Sets the current color to the given hex or HTML hex value

Sets the current color to the given hex or HTML hex value

Parameters

$color
string
$color The given color in hex or HTMl hex value

Returns

Color
$this
public Color
# rgb( array $color )

Sets the current color to the given RGB value

Sets the current color to the given RGB value

Returns

Color
$this
public Color
# contrast50( )

Finds the constrast of the current color using the 50/50 method then sets it as the internal color

Finds the constrast of the current color using the 50/50 method then sets it as the internal color

Returns

Color
$this
public Color
# contrastYiq( )

Finds the constrast of the current color in YIQ space then sets it as the internal color

Finds the constrast of the current color in YIQ space then sets it as the internal color

Returns

Color
$this
public string
# asHtml( )

Convert the internal color to HTML hex color

Convert the internal color to HTML hex color

Returns

string
The HTML hex color for the current color
public string
# asHex( )

Convert the internal color to hex

Convert the internal color to hex

Returns

string
The hex color for the current color
public array
# asRgb( )

Convert the internal color to an rgb array

Convert the internal color to an rgb array

Returns

array
The rgb color for the current color
private array
# toRgb( mixed $color, string $from = "hex" )

Convert a color from one format to rgb

Convert a color from one format to rgb

Parameters

$color
mixed
$color The color to make rgb
$from
string
$from The format to convert from

Returns

array
An rgb array

Magic methods summary

Properties summary

private array $color
#

A representation of the current color

A representation of the current color

Blesta API documentation generated by ApiGen 2.8.0