!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/bacon/bacon-qr-code/src/Renderer/Color/   drwxr-xr-x
Free 13.11 GB of 57.97 GB (22.62%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Rgb.php (1.91 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
declare(strict_types 1);

namespace 
BaconQrCode\Renderer\Color;

use 
BaconQrCode\Exception;

final class 
Rgb implements ColorInterface
{
    
/**
     * @var int
     */
    
private $red;

    
/**
     * @var int
     */
    
private $green;

    
/**
     * @var int
     */
    
private $blue;

    
/**
     * @param int $red the red amount of the color, 0 to 255
     * @param int $green the green amount of the color, 0 to 255
     * @param int $blue the blue amount of the color, 0 to 255
     */
    
public function __construct(int $redint $greenint $blue)
    {
        if (
$red || $red 255) {
            throw new 
Exception\InvalidArgumentException('Red must be between 0 and 255');
        }

        if (
$green || $green 255) {
            throw new 
Exception\InvalidArgumentException('Green must be between 0 and 255');
        }

        if (
$blue || $blue 255) {
            throw new 
Exception\InvalidArgumentException('Blue must be between 0 and 255');
        }

        
$this->red $red;
        
$this->green $green;
        
$this->blue $blue;
    }

    public function 
getRed() : int
    
{
        return 
$this->red;
    }

    public function 
getGreen() : int
    
{
        return 
$this->green;
    }

    public function 
getBlue() : int
    
{
        return 
$this->blue;
    }

    public function 
toRgb() : Rgb
    
{
        return 
$this;
    }

    public function 
toCmyk() : Cmyk
    
{
        
$c - ($this->red 255);
        
$m - ($this->green 255);
        
$y - ($this->blue 255);
        
$k min($c$m$y);

        return new 
Cmyk(
            (int) (
100 * ($c $k) / ($k)),
            (int) (
100 * ($m $k) / ($k)),
            (int) (
100 * ($y $k) / ($k)),
            (int) (
100 $k)
        );
    }

    public function 
toGray() : Gray
    
{
        return new 
Gray((int) (($this->red 0.21 $this->green 0.71 $this->blue 0.07) / 2.55));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0143 ]--