theme_vars.inc.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 3 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FI8TNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  21. */
  22. /**
  23. * \file htdocs/theme/eldy/theme_vars.inc.php
  24. * \brief File to declare variables of CSS style sheet
  25. * \ingroup core
  26. *
  27. * To include file, do this:
  28. * $var_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
  29. * if (is_readable($var_file)) include $var_file;
  30. */
  31. global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
  32. $theme_bordercolor = array(235, 235, 224);
  33. $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));
  34. if (!defined('ISLOADEDBYSTEELSHEET')) // File is run after an include of a php page, not by the style sheet, if the constant is not defined.
  35. {
  36. if (!empty($conf->global->MAIN_OPTIMIZEFORCOLORBLIND)) // user is loaded by dolgraph.class.php
  37. {
  38. if ($conf->global->MAIN_OPTIMIZEFORCOLORBLIND == 'flashy')
  39. {
  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. $theme_bgcolor = array(hexdec('F4'), hexdec('F4'), hexdec('F4'));
  48. $theme_bgcoloronglet = array(hexdec('DE'), hexdec('E7'), hexdec('EC'));
  49. // Colors
  50. $colorbackhmenu1 = '38,60,92'; // topmenu
  51. $colorbackvmenu1 = '49, 58, 70'; // vmenu
  52. $colortopbordertitle1 = '215,215,215'; // top border of title
  53. $colorbacktitle1 = '233,234,237'; // title of tables,list
  54. $colorbacktabcard1 = '255,255,255'; // card
  55. $colorbacktabactive = '234,234,234';
  56. $colorbacklineimpair1 = '255,255,255'; // line impair
  57. $colorbacklineimpair2 = '255,255,255'; // line impair
  58. $colorbacklinepair1 = '250,250,250'; // line pair
  59. $colorbacklinepair2 = '250,250,250'; // line pair
  60. $colorbacklinepairhover = '230,237,244'; // line hover
  61. $colorbacklinepairchecked = '230,237,244'; // line checked
  62. $colorbacklinebreak = '248,247,244'; // line break
  63. $colorbackbody = '255,255,255';
  64. $colortexttitlenotab = '35,135,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
  65. $colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
  66. $colortexttitle = '40, 40, 60';
  67. $colortexttitlelink = '10, 20, 100';
  68. $colortext = '0,0,0';
  69. $colortextlink = '10, 20, 100';
  70. $fontsize = '0.90em';
  71. $fontsizesmaller = '0.75em';
  72. $topMenuFontSize = '1.1em';
  73. $toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
  74. $toolTipFontColor = '#333';
  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 = '#727cf5';
  83. $badgeSecondary = '#6c757d';
  84. $badgeInfo = '#98a6ad';
  85. $badgeSuccess = '#0acf97';
  86. $badgeWarning = '#ffbc00'; // See $textWarning bc9526
  87. $badgeDanger = '#fa5c7c'; // See $textDanger
  88. $badgeDark = '#313a46';
  89. $badgeLight = '#eef2f7';
  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 = '#0acf97'; // Color ok
  105. $badgeStatus4b = '#0acf97'; // Color ok
  106. $badgeStatus5 = '#cad2d2';
  107. $badgeStatus6 = '#cad2d2';
  108. $badgeStatus7 = '#0acf97';
  109. $badgeStatus8 = '#993013';
  110. $badgeStatus9 = '#e7f0f0';
  111. // status color ajustement for color blind
  112. $colorblind_deuteranopes_badgeStatus4 = $colorblind_deuteranopes_badgeStatus7 = $colorblind_deuteranopes_badgeSuccess; //! text color black
  113. $colorblind_deuteranopes_badgeStatus_textColor4 = $colorblind_deuteranopes_badgeStatus_textColor7 = '#000';
  114. $colorblind_deuteranopes_badgeStatus1 = $colorblind_deuteranopes_badgeWarning;
  115. $colorblind_deuteranopes_badgeStatus_textColor1 = '#000';