• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/hook/page/themefonts.php
  • Класс: BitrixLandingHookPageThemeFonts
  • Вызов: ThemeFonts::setColors
protected function setColors(): void
{
	$color = $this->getField('COLOR');
	$hColor = $this->getField('COLOR_H');
	$css = '';

	if ($color && Theme::isHex($color))
	{
		$css .= "--theme-color-main: {$color} !important;";
	}
	if ($hColor && Theme::isHex($hColor))
	{
		$css .= "--theme-color-title: {$hColor} !important;";
	}

	if (!empty($css))
	{
		Asset::getInstance()->addString(
			"",
			false,
			AssetLocation::BEFORE_CSS
		)
		;
	}
}