public function setColorMode($colorMode)
    {
        $validColorModes = [
            self::COLOR_MODE_AUTO,
            self::COLOR_MODE_FORCED,
            self::COLOR_MODE_DISABLED,
        ];

        if (\in_array($colorMode, $validColorModes)) {
            $this->colorMode = $colorMode;
        } else {
            throw new \InvalidArgumentException('invalid color mode: ' . $colorMode);
        }
    }
public function setColorMode($colorMode)
    {
        $validColorModes = [
            self::COLOR_MODE_AUTO,
            self::COLOR_MODE_FORCED,
            self::COLOR_MODE_DISABLED,
        ];

        if (\in_array($colorMode, $validColorModes)) {
            $this->colorMode = $colorMode;
        } else {
            throw new \InvalidArgumentException('invalid color mode: ' . $colorMode);
        }
    }
public function setColorMode ( $ colorMode ) { $ validColorModes = [ self :: COLOR_MODE_AUTO , self :: COLOR_MODE_FORCED , self :: COLOR_MODE_DISABLED , ] ; if ( \ in_array ( $ colorMode , $ validColorModes ) ) { $ this -> colorMode = $ colorMode ; } else { throw new \ InvalidArgumentException ( 'invalid color mode: ' . $ colorMode ) ; } }
Set the current color mode.

@param string $colorMode
Set the current color mode .