27require_once DOL_DOCUMENT_ROOT .
'/core/lib/functions2.lib.php';
34 public $primaryColorHex =
'#263c5c';
35 public $primaryColorHsl = array(
45 public $loginBackground;
50 public $bannerBackground;
55 public $bannerUseDarkTheme;
67 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
68 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
69 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
70 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
71 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$mysoc->logo);
72 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
73 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
77 $this->menuLogoUrl =
getDolGlobalString(
'WEBPORTAL_MENU_LOGO_URL', $this->loginLogoUrl);
80 $this->bannerUseDarkTheme =
getDolGlobalInt(
'WEBPORTAL_BANNER_BACKGROUND_IS_DARK');
97 if (strpos($outColor,
'#') !== 0) {
98 $outColor =
'#'.$outColor;
103 $this->primaryColorHex = $outColor;
104 $this->primaryColorHsl =
colorHexToHsl($outColor,
true,
true);
loadPrimaryColor()
Load hex of primary theme color.
__construct()
Constructor.
colorArrayToHex($arraycolor, $colorifnotfound='888888')
Convert an array with RGB value into hex RGB value.
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,...
colorHexToHsl($hex, $alpha=false, $returnArray=false)
Color Hex to Hsl (used for style)
colorValidateHex($color, $allow_white=true)
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.