Location: PHPKode > scripts > RGB / CSS Color Process > rgb_eng.class.php
<?php
/* AUTOR / AUTHOR : LUIS QUIJADA SERRANO 
/* FECHA / DATE   : 7/03/2002.
/* VERSION        : 1.0
/* COMMENTS       : SEE THE DOCUMENTATION AT rgb_eng.class.txt
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* ORIGINAL CLASS  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
/* HEREIS: ENGLISH LIKE CLASS                                                */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
class RGB_Eng
{
  var $cb;

  function RGB_Eng(&$rgb)
  {
    $this->cb =& $rgb;
  }

  function rgb_extract_component($rgb, $component, $cseparator="")
  {
    return $this->cb->ExtraerComponenteRGB($rgb, $component, $cseparator);
  }
  function css_extract_component($csscolor, $component)
  {
    return $this->cb->ExtraerComponenteCSS($csscolor, $component);
  }

  function rgb_replace_component($rgb, $new, $component, $cseparator="")
  {
    return $this->cb->SubstituirComponenteRGB($rgb, $new, $component,
      $cseparator);
  }
  function css_replace_component($csscolor, $new, $component)
  {
    return $this->cb->SubstituirComponenteCSS($csscolor, $new, $component);
  }

  function rgb_inc_component($howmany, $rgb, $component, $cseparator="")
  {
    return $this->cb->IncrementarComponenteRGB($howmany, $rgb, $component, $cseparator);
  }
  function css_inc_component($howmany, $csscolor, $component)
  {
    return $this->cb->IncrementarComponenteCSS($howmany, $csscolor, $component);
  }
  
  function rgb_dec_component($howmany, $rgb, $component, $cseparator="")
  {
    return $this->cb->DecrementarComponenteRGB($howmany, $rgb, $component, $cseparator);
  }
  function css_dec_component($howmany, $csscolor, $component)
  {
    return $this->cb->DecrementarComponenteCSS($howmany, $csscolor, $component);
  }

  function rgb_saturate($howmany, $rgb, $component="", $cseparator="")
  {
    if ($component === "") $component = RGB_MAYOR;
    return $this->cb->SaturarRGB($howmany, $rgb, $component, $cseparator);
  }
  function css_saturate($howmany, $csscolor, $component="")
  {
    if ($component === "") $component = RGB_MAYOR;
    return $this->cb->SaturarCSS($howmany, $csscolor, $component);
  }

  function rgb_lightup($howmany, $rgb, $cseparator="")
  {
    return $this->cb->LuminizarRGB($howmany, $rgb, $cseparator);
  }
  function css_lightup($howmany, $csscolor)
  {
    return $this->cb->LuminizarCSS($howmany, $csscolor);
  }

  function rgb_darken($howmany, $rgb, $cseparator="")
  {
    return $this->cb->OscurecerRGB($howmany, $rgb, $cseparator);
  }
  function css_darken($howmany, $csscolor)
  {
    return $this->cb->OscurecerCSS($howmany, $csscolor);
  }

  function rgb2css($rgb, $cseparator="")
  {
    return $this->cb->ConvertirAColorCSS($rgb, $cseparator);
  }

  function css2rgb($csscolor, $cseparator="")
  {
    return $this->cb->ConvertirAColorRGB($csscolor, $cseparator);
  }

  function _RGB_Eng()
  {
  }
}

?>
Return current item: RGB / CSS Color Process