@param float $minContrast

@return ColorCombination[]
765124
public function getCombinations($minContrast = 0.0)
    {
        $combinations = array();
        foreach ($this->colors as $backgroundColor) {
            foreach ($this->colors as $foregroundColor) {
                if ($backgroundColor == $foregroundColor) {
                    continue;
                }

                $contrast = $this->algorithm->calculate($foregroundColor, $backgroundColor);
                if ($contrast > $minContrast) {
                    $combinations[] = new ColorCombination($foregroundColor, $backgroundColor, $contrast);
                }
            }
        }

        return $combinations;
    }
1137000
public function setMin(float $min) : Number
    {
        $this->attributes['min'] = $min;
        return $this->addTest('min', function ($value) use ($min) {
            return $value >= $min;
        });
    }
608000
public static function GetW3CStandardColors () {
		return [
			static::BLACK,
			static::GRAY,
			static::SILVER,
			static::WHITE,
			static::BLUE,
			static::NAVY,
			static::TEAL,
			static::GREEN,
			static::LIME,
			static::AQUA,
			static::YELLOW,
			static::RED,
			static::FUCHSIA,
			static::OLIVE,
			static::PURPLE,
			static::MAROON,
		];
	}
395521
public function range(int $min=null, int $max=null)
        {
                $min      = is_null($min) ? '-inf' : $min;
                $max      = is_null($max) ? '+inf' : $max;
           
                $response = $this->_redis->zrevrangebyscore($this->_key, $max, $min, 'WITHSCORES');
                $result   = [];
                for($i=0,$num=count($response);$i<$num;$i++) {
                        $result[$response[$i]] = intval($response[++$i]);
                }
                return $result;
        }
928434
public static function getSplitPaymentsTrxTypes()
    {
        return [
            self::SALE,
            self::SALE_3D,
            self::TCS,
            self::FASHIONCHEQUE,
            self::INTERSOLVE
        ];
    }
759223
function size($min = null, $max = null) {
        $size = [];
        if ($min) $size['min'] = $min;
        if ($max) $size['max'] = $max;
        if (count($size)) $this->data['size'] = $size;
        return $this;
    }
844532
public function getContrastRatio($color1, $color2): float
    {
        return Plugin::$plugin->color->getContrastRatio($color1, $color2);
    }
249149
private Color4f[] getSymmetryColors(int nColors) {
		int offset = 0;
		int dMax = nColors + offset;
		Color[] col = ColorBrewer.Spectral.getColorPalette(dMax);
		Color4f[] colors = ColorConverter.convertColor4f(col);
		System.arraycopy(colors, offset, colors, 0, dMax-offset);
		return colors;
	}
856969
public static function getPrimitives() {
        return [
            Type::TYPE_NULL     => 'null',
            Type::TYPE_BOOLEAN  => 'bool',
            Type::TYPE_LONG     => 'int',
            Type::TYPE_DOUBLE   => 'float',
            Type::TYPE_STRING   => 'string',
            Type::TYPE_OBJECT   => 'object',
            Type::TYPE_ARRAY    => 'array',
            Type::TYPE_CALLABLE => 'callable',
        ];
    }
478792
public static function cmyk2cmy( $cmyk )
	{
		list( $c, $m, $y, $k ) = $cmyk;
		$c	= min( 1, $c * ( 1 - $k ) + $k );
		$m	= min( 1, $m * ( 1 - $k ) + $k );
		$y	= min( 1, $y * ( 1 - $k ) + $k );
		return array( $c, $m, $y );
	}
1166777
public function triad(int $distance = self::DEFAULT_DISTANCE): array
    {
        return [
            $this->baseColor,
            $this->baseColor->adjustHue(180 - $distance),
            $this->baseColor->adjustHue(180 + $distance),
        ];
    }
1370249
public function grayscale()
    {
        $gray = min(
                255
                , round(
                        0.299 * $this->getRed() +
                        0.587 * $this->getGreen() +
                        0.114 * $this->getBlue()
                )
        );

        return $this->setFromArray(array(
                    $gray, $gray, $gray, $this->getAlpha()
        ));
    }
545064
public static function arrayValue($array, $minPosition = null, $maxPosition = null, $integerKeys = false) {
		if (empty($array)) {
			return null;
		}
		if ($integerKeys) {
			$max = count($array) - 1;
			return $array[static::int(0, $max)];
		}
		$keys = array_keys($array);
		$values = array_values($array);
		$max = count($keys) - 1;
		return $values[static::int(0, $max)];
	}
58489
public static function min(array ...$arrays): array
    {
        self::checkArrayLengths($arrays);

        $number_of_arrays = count($arrays);
        $length_of_arrays = count($arrays[0]);
        $mins             = array_map(
            function ($x) {
                return $x;
            },
            $arrays[0]
        );

        for ($i = 0; $i < $length_of_arrays; $i++) {
            for ($j = 1; $j < $number_of_arrays; $j++) {
                $mins[$i] = min($mins[$i], $arrays[$j][$i]);
            }
        }

        return $mins;
    }
782003
public static function arrayCombine(array $first, array $second, $replacement = null, $order = true)
    {
        // Fix for different length
        if (count($first) !== count($second)) {
            $input = array($first, $second);
            $count = array_map('count', $input);

            // Find the largest and lowest array index
            $min = array_keys($count , max($count));
            $max = array_keys($count , min($count));

            // Find indexes
            $min = $min[0];
            $max = $max[0];

            $largest = $input[$min];
            $smallest = $input[$max];

            // Now fix the length
            foreach ($largest as $key => $value) {
                if (!isset($smallest[$key])) {
                    $smallest[$key] = $replacement; 
                }
            }

            $first = $smallest;
            $second = $largest;
        }

        if ($order === true) {
            return array_combine($second, $first);
        } else {
            return array_combine($first, $second);
        }
    }
687947
public function getBaseColors($limit = 10) {

		$hexs 	= $this -> getHexColors();
		$output = [];
		$index  = 0;

		foreach($hexs as $hex => $amount) {

			if($index >= $limit) {
				break;
			}

			$color = Color :: name((string) $hex);

			if(null !== $color) {
				$output[] = $color;
			}

			$index++;
		}

		return $output;
	}
1100368
public function getConstants()
    {
        if ($this->constants === null) {
            $prettyPrinter = new PrettyPrinter\Standard;
            // lazy load class constants list
            $this->constants = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\ClassConst) {
                    foreach ($stmt->consts as $const) {
                        $this->constants[$const->name] = trim(
                            $prettyPrinter->prettyPrintExpr($const->value),
                            '"\''
                        );
                    }
                }
            }
        }
        return $this->constants;
    }