dolibarr 19.0.3
theme_vars.inc.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2021-2023 Anthony Berton <anthony.berton@bb2a.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
30global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
31$theme_bordercolor = array(235, 235, 224);
32$theme_datacolor = array(array(137, 86, 161), array(60, 147, 183), array(250, 190, 80), array(191, 75, 57), array(80, 166, 90), array(140, 140, 220), array(190, 120, 120), array(190, 190, 100), array(115, 125, 150), array(100, 170, 20), array(150, 135, 125), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150));
33if (!defined('ISLOADEDBYSTEELSHEET')) { // File is run after an include of a php page, not by the style sheet, if the constant is not defined.
34 if (getDolGlobalString('MAIN_OPTIMIZEFORCOLORBLIND')) { // user is loaded by dolgraph.class.php
35 if (getDolGlobalString('MAIN_OPTIMIZEFORCOLORBLIND') == 'flashy') {
36 $theme_datacolor = array(array(157, 56, 191), array(0, 147, 183), array(250, 190, 30), array(221, 75, 57), array(0, 166, 90), array(140, 140, 220), array(190, 120, 120), array(190, 190, 100), array(115, 125, 150), array(100, 170, 20), array(150, 135, 125), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150));
37 } else {
38 // for now we use the same configuration for all types of color blind
39 $theme_datacolor = array(array(248, 220, 1), array(9, 85, 187), array(42, 208, 255), array(0, 0, 0), array(169, 169, 169), array(253, 102, 136), array(120, 154, 190), array(146, 146, 55), array(0, 52, 251), array(196, 226, 161), array(222, 160, 41), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150));
40 }
41 }
42}
43$theme_bgcolor = array(hexdec('F4'), hexdec('F4'), hexdec('F4'));
44$theme_bgcoloronglet = array(hexdec('DE'), hexdec('E7'), hexdec('EC'));
45
46
47// Colors
48$colorbackhmenu1 = '90,50,120'; // topmenu
49$colorbackvmenu1 = '255,255,255'; // vmenu
50$colortopbordertitle1 = ''; // top border of tables-lists title. not defined = default to colorbackhmenu1
51$colorbacktitle1 = '240,240,240'; // title of tables-lists
52$colorbacktabcard1 = '255,255,255'; // card
53$colorbacktabactive = '234,234,234';
54$colorbacklineimpair1 = '255,255,255'; // line impair
55$colorbacklineimpair2 = '255,255,255'; // line impair
56$colorbacklinepair1 = '251,251,251'; // line pair
57$colorbacklinepair2 = '251,251,251'; // line pair
58$colorbacklinepairhover = '230,237,244'; // line hover
59$colorbacklinepairchecked = '230,237,244'; // line checked
60$colorbacklinebreak = '250,246,251';
61$colorbackbody = '248,248,248';
62$colortexttitlenotab = '80,71,5';
63$colortexttitlenotab2 = '100,0,100';
64$colortexttitle = '20,20,20';
65$colortexttitlelink = '0,0,120';
66$colortext = '0,0,0';
67$colortextlink = '0,0,120';
68$fontsize = '0.94em';
69$fontsizesmaller = '0.75em';
70$topMenuFontSize = '1.1em';
71$toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
72$toolTipFontColor = '#333';
73$butactionbg = '150, 110, 162, 0.95';
74$textbutaction = '255, 255, 255, 255';
75
76// text color
77$textSuccess = '#28a745';
78$colorblind_deuteranopes_textSuccess = '#37de5d';
79$textWarning = '#a37c0d'; // See $badgeWarning
80$textDanger = '#8c4446'; // See $badgeDanger
81$colorblind_deuteranopes_textWarning = $textWarning; // currently not tested with a color blind people so use default color
82
83// Badges colors
84$badgePrimary = '#007bff';
85$badgeSecondary = '#999999';
86$badgeInfo = '#17a2b8';
87$badgeSuccess = '#28a745';
88$badgeWarning = '#a37c0d'; // See $textWarning
89$badgeDanger = '#8c4446'; // See $textDanger
90$badgeDark = '#343a40';
91$badgeLight = '#f8f9fa';
92
93// badge color ajustement for color blind
94$colorblind_deuteranopes_badgeSuccess = '#37de5d';
96$colorblind_deuteranopes_badgeWarning = '#e4e411';
97$colorblind_deuteranopes_badgeDanger = $badgeDanger; // currently not tested with a color blind people so use default color
98
99/* default color for status : After a quick check, somme status can have oposite function according to objects
100* So this badges status uses default value according to theme eldy status img
101* TODO: use color definition vars above for define badges color status X -> exemple $badgeStatusValidate, $badgeStatusClosed, $badgeStatusActive ....
102*/
103$badgeStatus0 = '#cbd3d3'; // draft
104$badgeStatus1 = '#bc9526'; // validated
105$badgeStatus1b = '#bc9526'; // validated
106$badgeStatus2 = '#e6f0f0'; // approved
107$badgeStatus3 = '#bca52b';
108$badgeStatus4 = '#25a580'; // Color ok
109$badgeStatus4b = '#25a580'; // Color ok
110$badgeStatus5 = '#cad2d2';
111$badgeStatus6 = '#cad2d2';
112$badgeStatus7 = '#277d1e';
113$badgeStatus8 = '#993013';
114$badgeStatus9 = '#e7f0f0';
115$badgeStatus10 = '#993013';
116$badgeStatus11 = '#15a540';
117
118// status color ajustement for color blind
119$colorblind_deuteranopes_badgeStatus4 = $colorblind_deuteranopes_badgeStatus7 = $colorblind_deuteranopes_badgeSuccess;
120$colorblind_deuteranopes_badgeStatus_textColor4 = $colorblind_deuteranopes_badgeStatus_textColor7 = '#000';
121$colorblind_deuteranopes_badgeStatus1 = $colorblind_deuteranopes_badgeWarning;
122$colorblind_deuteranopes_badgeStatus_textColor1 = '#000';
$colorblind_deuteranopes_badgeSuccess_textColor7
text color black
$colorblind_deuteranopes_badgeStatus_textColor4
text color black
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.