Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Color
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

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
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

Parameters

$color

The given color in a numerically indexed array where index 0 is red, index 1 is green, index 2 is blue

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
Blesta API documentation generated by ApiGen