Set the dataset color.

@param string|array|Collection $color

@return self
480837
public function color($color)
    {
        if ($color instanceof Collection) {
            $color = $color->toArray();
        }

        return $this->options([
            'color' => $color,
        ]);
    }
675067
protected function _set_fill_color($color)
    {
        $this->_pdf->setColor($color);
        $alpha = isset($color["alpha"]) ? $color["alpha"] : 1;
        if ($this->_current_opacity) {
            $alpha *= $this->_current_opacity;
        }
        $this->_set_fill_transparency("Normal", $alpha);
    }
1299822
public function setLightAmbientColor($red, $green, $blue)
    {
        $this->lightAmbientColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
        return $this;
    }
759517
public function setFromArray(array $color)
    {
        return $this->setRed($color[0])
                        ->setGreen($color[1])
                        ->setBlue($color[2])
                        ->setAlpha($color[3]);
    }
145500
public function setTransparent($color) {
	    $color = call_user_func_array([$this, 'getColorWithRGB'], func_get_args());
	    return imagecolortransparent($this->image, $color);
    }
913769
protected function setColorStyle( $styleType, $color, $type = false, $colorType = 'rgb' )
    {
        // Set the styles
        $styles = is_array( $color )
            ? $color
            : [
                'type'  => $type,
                'color' => [ $colorType => str_replace( '#', '', $color ) ],
            ];

        return $this->setStyle( $styleType, $styles );
    }
422319
@CheckReturnValue
    public RoleManager setColor(Color color)
    {
        this.color = color == null ? Role.DEFAULT_COLOR_RAW : color.getRGB();
        set |= COLOR;
        return this;
    }
933262
public function color($color)
    {
        if (is_array($color)) { // rgb
            [$r, $g, $b] = $color;
            $r = substr('0' . dechex($r), -2);
            $g = substr('0' . dechex($g), -2);
            $b = substr('0' . dechex($b), -2);
            $color = '#' . $r . $g . $b;
        }
        $this->color = $color;
        return $this;
    }
1163454
function setBgColor($color)
    {
        $value = $this->_getColor($color);
        $this->_bg_color = $value;
        if ($this->_pattern == 0) { // force color to be seen
            $this->_pattern = 1;
        }
    }
1101836
public function setPixelColor($x, $y, Color $color) {
		imagesetpixel($this->image, $x, $y, $color->rgb);
		return $this;
	}
1007109
public function setFontColor($fontColor)
    {
        $this->fontColor = $fontColor;
        $this->hasSetFontColor = true;
        $this->shouldApplyFont = true;
        return $this;
    }
649517
public function setBackgroundColor($color)
    {
        $this->_backgroundColor = $color;
        $this->_rtf->getColorTable()->add($color);
    }
1118462
public static function fromHex(string $color): Color
    {
        if (!Validator::isValidHex($color)) {
            throw new InvalidColorException('Invalid hex value');
        }

        return new self(...array_values(self::hexToRgb($color)));
    }
977944
public function setBackgroundColor(int $color) : void
    {
        $background = $this->info(true)->backgroundImage;

        $this->set([
            'backgroundImage' => [
                'color' => sprintf('%06X', $color),
                'sourceUrl' => $background->sourceUrl ?? ''
            ]
        ]);
    }
280999
public void setColor(int color) {
		setRed(ColorUtils.getRed(color));
		setGreen(ColorUtils.getGreen(color));
		setBlue(ColorUtils.getBlue(color));
		if (color > 16777215 || color < 0) {
			setAlpha(ColorUtils.getAlpha(color));
		}
	}
1036570
public static function setColor($color, $string)
    {
        if (!isset(self::$colorTable[$color]))
        {
            throw new \Exception('ansi color is not defined');
        }

        return sprintf("\033[%sm%s\033[0m", self::$colorTable[$color], $string);
    }
1121440
public function addColor(Color $color)
    {
        if (!$this->colors->contains($color)) {
            $this->colors->add($color);
            $color->setInteractionSelection($this);
        }
    }