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