theme_vars.inc.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. /**
  24. * \file htdocs/theme/eldy/theme_vars.inc.php
  25. * \brief File to declare variables of CSS style sheet
  26. * \ingroup core
  27. *
  28. * To include file, do this:
  29. * $var_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
  30. * if (is_readable($var_file)) include $var_file;
  31. */
  32. global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
  33. $theme_bordercolor = array(235, 235, 224);
  34. $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));
  35. if (!defined('ISLOADEDBYSTEELSHEET')) { // File is run after an include of a php page, not by the style sheet, if the constant is not defined.
  36. if (getDolGlobalString('MAIN_OPTIMIZEFORCOLORBLIND')) { // user is loaded by dolgraph.class.php
  37. if (getDolGlobalString('MAIN_OPTIMIZEFORCOLORBLIND') == 'flashy') {
  38. $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));
  39. } else {
  40. // for now we use the same configuration for all types of color blind
  41. $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));
  42. }
  43. }
  44. }
  45. $theme_bgcolor = array(hexdec('F4'), hexdec('F4'), hexdec('F4'));
  46. $theme_bgcoloronglet = array(hexdec('DE'), hexdec('E7'), hexdec('EC'));
  47. // Colors
  48. $colorbackbody = '255,255,255';
  49. $colorbackhmenu1 = '38,60,92'; // topmenu
  50. $colorbackvmenu1 = '250,250,250'; // vmenu
  51. $colortopbordertitle1 = '215,215,215'; // top border of title
  52. $colorbacktitle1 = '237,238,240'; // title of tables,list
  53. $colorbacktabcard1 = '255,255,255'; // card
  54. $colorbacktabactive = '234,234,234';
  55. $colorbacklineimpair1 = '255,255,255'; // line impair
  56. $colorbacklineimpair2 = '255,255,255'; // line impair
  57. $colorbacklinepair1 = '252,252,252'; // line pair
  58. $colorbacklinepair2 = '252,252,252'; // line pair
  59. $colorbacklinepairhover = '230,237,244'; // line hover
  60. $colorbacklinepairchecked = '230,237,244'; // line checked
  61. $colorbacklinebreak = '248,247,244'; // line break
  62. $colortexttitlenotab = '35,135,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
  63. $colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
  64. $colortexttitle = '40, 40, 60';
  65. $colortexttitlelink = '10, 20, 100';
  66. $colortext = '0,0,0';
  67. $colortextlink = '10, 20, 100';
  68. $fontsize = '0.92em';
  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';
  75. // text color
  76. $textSuccess = '#28a745';
  77. $colorblind_deuteranopes_textSuccess = '#37de5d';
  78. $textWarning = '#bc9526'; // See $badgeWarning
  79. $textDanger = '#af4705'; // See $badgeDanger
  80. $colorblind_deuteranopes_textWarning = $textWarning; // currently not tested with a color blind people so use default color
  81. // Badges colors
  82. $badgePrimary = '#007bff';
  83. $badgeSecondary = '#aaaabb';
  84. $badgeInfo = '#aaaabb';
  85. $badgeSuccess = '#55a580';
  86. $badgeWarning = '#bc9526'; // See $textWarning bc9526
  87. $badgeDanger = '#af4705'; // See $textDanger
  88. $badgeDark = '#343a40';
  89. $badgeLight = '#f8f9fa';
  90. // badge color ajustement for color blind
  91. $colorblind_deuteranopes_badgeSuccess = '#37de5d'; //! text color black
  92. $colorblind_deuteranopes_badgeSuccess_textColor7 = '#000';
  93. $colorblind_deuteranopes_badgeWarning = '#e4e411';
  94. $colorblind_deuteranopes_badgeDanger = $badgeDanger; // currently not tested with a color blind people so use default color
  95. /* default color for status : After a quick check, somme status can have oposite function according to objects
  96. * So this badges status uses default value according to theme eldy status img
  97. * TODO: use color definition vars above for define badges color status X -> exemple $badgeStatusValidate, $badgeStatusClosed, $badgeStatusActive ....
  98. */
  99. $badgeStatus0 = '#cbd3d3'; // draft
  100. $badgeStatus1 = '#bc9526'; // validated
  101. $badgeStatus1b = '#bc9526'; // validated
  102. $badgeStatus2 = '#9c9c26'; // approved
  103. $badgeStatus3 = '#bca52b';
  104. $badgeStatus4 = '#25a580'; // Color ok
  105. $badgeStatus4b = '#25a580'; // Color ok
  106. $badgeStatus5 = '#cad2d2';
  107. $badgeStatus6 = '#cad2d2';
  108. $badgeStatus7 = '#25a580';
  109. $badgeStatus8 = '#993013';
  110. $badgeStatus9 = '#e7f0f0';
  111. $badgeStatus10 = '#993013';
  112. $badgeStatus11 = '#15a540';
  113. // status color ajustement for color blind
  114. $colorblind_deuteranopes_badgeStatus4 = $colorblind_deuteranopes_badgeStatus7 = $colorblind_deuteranopes_badgeSuccess; //! text color black
  115. $colorblind_deuteranopes_badgeStatus_textColor4 = $colorblind_deuteranopes_badgeStatus_textColor7 = '#000';
  116. $colorblind_deuteranopes_badgeStatus1 = $colorblind_deuteranopes_badgeWarning;
  117. $colorblind_deuteranopes_badgeStatus_textColor1 = '#000';