Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php
public function applyFromArray(array $pStyles)
    {
        if ($this->isSupervisor) {
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles));
        } else {
            if (isset($pStyles['rgb'])) {
                $this->setRGB($pStyles['rgb']);
            }
            if (isset($pStyles['argb'])) {
                $this->setARGB($pStyles['argb']);
            }
        }

        return $this;
    }
public function applyFromArray(array $pStyles)
    {
        if ($this->isSupervisor) {
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles));
        } else {
            if (isset($pStyles['rgb'])) {
                $this->setRGB($pStyles['rgb']);
            }
            if (isset($pStyles['argb'])) {
                $this->setARGB($pStyles['argb']);
            }
        }

        return $this;
    }
Apply styles from array.

<code>
$spreadsheet->getActiveSheet()->getStyle('B2')->getFont()->getColor()->applyFromArray(['rgb' => '808080']);
</code>

@param array $pStyles Array containing style information

@throws PhpSpreadsheetException

@return Color