Sets the line color

@param array $color array(r,g,b)
962481
protected function _set_stroke_color($color) {
    if($this->_last_stroke_color == $color)
      return;

    $this->_last_stroke_color = $color;

    if (isset($color[3])) {
      $type = "cmyk";
      list($c1, $c2, $c3, $c4) = array($color[0], $color[1], $color[2], $color[3]);
    }
    elseif (isset($color[2])) {
      $type = "rgb";
      list($c1, $c2, $c3, $c4) = array($color[0], $color[1], $color[2], null);
    }
    else {
      $type = "gray";
      list($c1, $c2, $c3, $c4) = array($color[0], $color[1], null, null);
    }
    
    $this->_pdf->setcolor("stroke", $type, $c1, $c2, $c3, $c4);
  }
1148731
public function bg($color)
    {
        Assert::nullOrOneOf($color, self::$colors, 'The color must be null or one of the Style::* color constants. Got: "%s"');

        $this->bgColor = $color;

        return $this;
    }
322659
public void setColor(final Color COLOR) {
        if (null == color) {
            _color = COLOR;
            fireSectionEvent(UPDATE_EVENT);
        } else {
            color.set(COLOR);
        }
    }
1121440
public function addColor(Color $color)
    {
        if (!$this->colors->contains($color)) {
            $this->colors->add($color);
            $color->setInteractionSelection($this);
        }
    }
408791
public void setColor(int color) {
		int x1, y1;
		if(mOrientation) {
			x1 = (mBarLength + mBarPointerHaloRadius);
			y1 = mBarThickness;
		}        else {
			x1 = mBarThickness;
			y1 = (mBarLength + mBarPointerHaloRadius);
		}
		
		Color.colorToHSV(color, mHSVColor);
		shader = new LinearGradient(mBarPointerHaloRadius, 0,
				x1, y1, new int[] {Color.WHITE, color, Color.BLACK}, null,
				Shader.TileMode.CLAMP);
		mBarPaint.setShader(shader);
	    calculateColor(mBarPointerPosition);
		mBarPointerPaint.setColor(mColor);
		if (mPicker != null) {
			mPicker.setNewCenterColor(mColor);
			if(mPicker.hasOpacityBar())
				mPicker.changeOpacityBarColor(mColor);
		}
		invalidate();
	}
325952
public void setColor(final Color COLOR) {
        if (null == color) {
            _color = COLOR;
        } else {
            color.set(COLOR);
        }
        fireMarkerEvent(COLOR_CHANGED_EVENT);
    }
732800
public void setColor(String color) {
		setRed(ColorUtils.getRed(color));
		setGreen(ColorUtils.getGreen(color));
		setBlue(ColorUtils.getBlue(color));
		String alpha = ColorUtils.getAlpha(color);
		if (alpha != null) {
			setAlpha(alpha);
		}
	}
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));
		}
	}
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)));
    }
1155768
public function setBackgroundColor(\Jdenticon\Color $color)
    {
        parent::setBackgroundColor($color);
        $this->canvas->backColor = $this->backgroundColor->toRgba();
    }
1202856
public function setIconColor($color = null)
    {
        $color === null || Checkers::checkColor($color, null);
        $this->iconColor = $color;
        return $this;
    }
666069
public static function setColors(array $colors = array())
    {
        if (!empty($colors)) {
            static::$colors = $colors;
            return;
        }
        static::$colors = array(
            \Monolog\Logger::DEBUG     => 'purple',
            \Monolog\Logger::INFO      => 'cyan',
            \Monolog\Logger::NOTICE    => 'green',
            \Monolog\Logger::WARNING   => 'yellow',
            \Monolog\Logger::ERROR     => 'red',
            \Monolog\Logger::CRITICAL  => 'red',
            \Monolog\Logger::ALERT     => 'red',
            \Monolog\Logger::EMERGENCY => 'red',
        );
    }
823915
public function setColor($color)
    {
        if (null === $color) {
            return $this;
        }

        $this->color = $this->convertColor($color);

        return $this;
    }
702073
function setColor($color, $force = false) {
    $new_color = array($color[0], $color[1], $color[2], isset($color[3]) ? $color[3] : null);
    
    if (!$force && $this->currentColour == $new_color) return;
    
    if (isset($new_color[3])) {
      $this->currentColour = $new_color;
      $this->objects[$this->currentContents]['c'] .= vsprintf("\n%.3F %.3F %.3F %.3F k", $this->currentColour);
    }

    elseif (isset($new_color[2])) {
      $this->currentColour = $new_color;
      $this->objects[$this->currentContents]['c'] .= vsprintf("\n%.3F %.3F %.3F rg", $this->currentColour);
    }
  }
737126
function set_background_color($color)
    {
        $col = $this->munge_color($color);

        if (is_null($col)) {
            return;
            //$col = self::$_defaults["background_color"];
        }

        //see __set and __get, on all assignments clear cache, not needed on direct set through __set
        $this->_prop_cache["background_color"] = null;
        $this->_props["background_color"] = is_array($col) ? $col["hex"] : $col;
    }
842460
public function removeColor(Color $color)
    {
        if ($this->colors->contains($color)) {
            $this->colors->removeElement($color);
        }
    }
567976
public void setColor(int color) {
        setColor(Colors.byteToGl(Color.red(color)), //
                Colors.byteToGl(Color.green(color)), //
                Colors.byteToGl(Color.blue(color)));
    }