theme_vars.inc.php 6.0 KB

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