SimpleSoftwareIO\QrCode\BaconQrCodeGenerator::backgroundColor PHP Method

backgroundColor() public method

Changes the background color of a QrCode.
public backgroundColor ( integer $red, integer $green, integer $blue )
$red integer
$green integer
$blue integer
    public function backgroundColor($red, $green, $blue)
    {
        $this->writer->getRenderer()->setBackgroundColor(new Rgb($red, $green, $blue));
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Changes the background color of a QrCode
  *
  * @param int $red
  * @param int $green
  * @param int $blue
  * @return $this 
  * @static 
  */
 public static function backgroundColor($red, $green, $blue)
 {
     return \SimpleSoftwareIO\QrCode\BaconQrCodeGenerator::backgroundColor($red, $green, $blue);
 }