Lines Matching refs:self

39         self::PRIMARY_VALUE,
40 self::SECONDARY_VALUE,
193 'tip' => self::TIP_COLOR,
251 private $nameType = self::VALUE_TYPE_UNKNOWN_NAME;
270 if (self::$dokuWikiStyles === null) {
271 self::$dokuWikiStyles = (new StyleUtils())->cssStyleini();
273 return self::$dokuWikiStyles;
284 return self::createFromHex("#0d6efd");
325 ->setNameType(self::VALUE_TYPE_CSS_NAME);
339 ->setNameType(self::VALUE_TYPE_CSS_NAME);
437 $targetRed = self::round(Math::lerp($color2->getRed(), $this->getRed(), $weight));
438 $targetGreen = self::round(Math::lerp($color2->getGreen(), $this->getGreen(), $weight));
439 $targetBlue = self::round(Math::lerp($color2->getBlue(), $this->getBlue(), $weight));
454 $targetRed = self::round(Math::unlerp($color2->getRed(), $this->getRed(), $weight));
458 $targetGreen = self::round(Math::unlerp($color2->getGreen(), $this->getGreen(), $weight));
462 $targetBlue = self::round(Math::unlerp($color2->getBlue(), $this->getBlue(), $weight));
526 case self::VALUE_TYPE_CSS_NAME:
527 return strtolower(self::CSS_COLOR_NAMES[$this->name]);
551 return self::createFromHex($color);
553 return self::createFromName($color);
573 case self::VALUE_TYPE_RGB_ARRAY:
575 case self::VALUE_TYPE_CSS_NAME:
576 case self::VALUE_TYPE_RGB_HEX;
578 case self::VALUE_TYPE_BOOTSTRAP_NAME:
589 case self::VALUE_TYPE_RESET:
732 function toMinimumContrastRatio(string $color, float $minimum = self::MINIMUM_CONTRAST_RATIO, $darknessIncrement = 5): ColorRgb
771 if (in_array($hexColor, self::CSS_COLOR_NAMES)) {
772 return self::CSS_COLOR_NAMES[$hexColor];
781 function toMinimumContrastRatioAgainstWhite(float $minimumContrastRatio = self::MINIMUM_CONTRAST_RATIO, int $darknessIncrement = 5): ColorRgb
783 return $this->toMinimumContrastRatio(self::WHITE, $minimumContrastRatio, $darknessIncrement);
797 $this->nameType = self::VALUE_TYPE_RGB_HEX;
822 $this->nameType = self::VALUE_TYPE_RGB_ARRAY;
842 if (in_array($qualifiedName, self::BOOTSTRAP_COLORS)) {
851 return self::createFromString($primaryColor);
853 LogUtility::msg("The primary color cannot be set with the value primary. Default to bootstrap color.", self::BRANDING_COLOR_CANONICAL);
860 return self::createFromString($secondaryColor);
862 LogUtility::msg("The secondary color cannot be set with the value secondary. Default to bootstrap color.", self::BRANDING_COLOR_CANONICAL);
867 return $this->setNameType(self::VALUE_TYPE_BOOTSTRAP_NAME);
869 if ($qualifiedName === self::VALUE_TYPE_RESET) {
870 return $this->setNameType(self::VALUE_TYPE_RESET);
872 if (in_array($qualifiedName, array_keys(self::CSS_COLOR_NAMES))) {
873 $this->setHex(self::CSS_COLOR_NAMES[$qualifiedName])
874 ->setNameType(self::VALUE_TYPE_CSS_NAME);