28require_once DOL_DOCUMENT_ROOT .
'/core/lib/functions2.lib.php';
38 public $primaryColorHex =
'#263c5c';
43 public $primaryColorHsl = array(
63 public $loginBackground;
68 public $bannerBackground;
73 public $bannerUseDarkTheme;
85 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
86 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
87 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
88 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
89 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$mysoc->logo);
90 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
91 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
95 $this->menuLogoUrl =
getDolGlobalString(
'WEBPORTAL_MENU_LOGO_URL', $this->loginLogoUrl);
98 $this->bannerUseDarkTheme =
getDolGlobalInt(
'WEBPORTAL_BANNER_BACKGROUND_IS_DARK');
115 if (strpos($outColor,
'#') !== 0) {
116 $outColor =
'#'.$outColor;
121 $this->primaryColorHex = $outColor;
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.