You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

theme.js 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2024 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (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 GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. // IMPORTANT: any change in this file requires restart of the dev server
  21. const grid = 8;
  22. const baseFontSizeRaw = 13;
  23. module.exports = {
  24. colors: {
  25. blue: '#4b9fd5',
  26. veryLightBlue: '#f2faff',
  27. lightBlue: '#cae3f2',
  28. darkBlue: '#236a97',
  29. veryDarkBlue: '#0E516F',
  30. green: '#00aa00',
  31. lightGreen: '#b0d513',
  32. veryLightGreen: '#f5f9fc',
  33. yellow: '#eabe06',
  34. orange: '#ed7d20',
  35. red: '#D02F3A',
  36. purple: '#9139d4',
  37. gray94: '#efefef',
  38. gray80: '#cdcdcd',
  39. gray71: '#b4b4b4',
  40. gray67: '#aaa',
  41. gray60: '#888',
  42. gray52: '#525252',
  43. gray40: '#404040',
  44. disabledQualityGate: '#757575',
  45. sizeRatingBackground: '#297BAE',
  46. transparentWhite: 'rgba(255,255,255,0.62)',
  47. transparentGray: 'rgba(200, 200, 200, 0.5)',
  48. transparentBlack: 'rgba(0, 0, 0, 0.25)',
  49. disableGrayText: '#bbb',
  50. disableGrayBorder: '#ddd',
  51. disableGrayBg: '#ebebeb',
  52. barBackgroundColor: '#f3f3f3',
  53. barBackgroundColorHighlight: '#f8f8f8',
  54. barBorderColor: '#e6e6e6',
  55. globalNavBarBg: '#262626',
  56. educationPrinciplesBgColor: '#F4F6FF',
  57. educationPrinciplesBorderColor: '#B0BDF9',
  58. favoriteColor: '#e77213',
  59. homepageColor: '#D86C13',
  60. // table
  61. rowHoverHighlight: '#ecf6fe',
  62. // fonts
  63. baseFontColor: '#333',
  64. secondFontColor: '#656565',
  65. // forms
  66. mandatoryFieldColor: '#a4030f',
  67. // leak
  68. leakPrimaryColor: '#fbf3d5',
  69. leakSecondaryColor: '#f1e8cb',
  70. // issues
  71. secondIssueBgColor: '#f8eeee',
  72. issueBgColor: '#f2dede',
  73. hotspotBgColor: '#eeeff4',
  74. issueLocationSelected: '#f4b1b0',
  75. issueLocationHighlighted: '#e1e1f2',
  76. conciseIssueRed: '#d18582',
  77. conciseIssueRedSelected: '#a4030f',
  78. // coverage
  79. lineCoverageRed: '#a4030f',
  80. lineCoverageGreen: '#b4dd78',
  81. // alerts
  82. warningIconColor: '#eabe06',
  83. alertBorderError: '#f4b1b0',
  84. alertBackgroundError: '#f2dede',
  85. alertTextError: '#862422',
  86. alertIconError: '#a4030f',
  87. alertBorderWarning: '#faebcc',
  88. alertBackgroundWarning: '#fcf8e3',
  89. alertTextWarning: '#6f4f17',
  90. alertIconWarning: '#db781a',
  91. alertBorderSuccess: '#d6e9c6',
  92. alertBackgroundSuccess: '#dff0d8',
  93. alertTextSuccess: '#215821',
  94. alertIconSuccess: '#6d9867',
  95. alertBorderInfo: '#b1dff3',
  96. alertBackgroundInfo: '#d9edf7',
  97. alertTextInfo: '#0e516f',
  98. alertIconInfo: '#0271b9',
  99. // badge
  100. badgeBlueBackground: '#2E7CB5',
  101. badgeBlueColor: '#FFFFFF',
  102. badgeRedBackgroundOnIssue: '#EEC8C8',
  103. // alm
  104. azure: '#0078d7',
  105. bitbucket: '#0052CC',
  106. github: '#e1e4e8',
  107. // code/pre
  108. codeBackground: '#f5f5f5',
  109. codeBorder: '#e6e6e6',
  110. codeAdded: '#dff0d8',
  111. codeRemoved: '#f2dede',
  112. // promotion
  113. darkBackground: '#292929',
  114. darkBackgroundSeparator: '#413b3b',
  115. darkBackgroundFontColor: '#f6f8fa',
  116. //quality gate badges
  117. badgeGreenBackground: '#f0faec',
  118. badgeRedBackground: '#ffeaea',
  119. // new color palette
  120. // Some of these colors duplicate what we have above, but this will make it
  121. // easier to align with the UX designers on what colors to use where.
  122. // Colors that have transparency are suffixed with an "a" followed by the percentage
  123. // value of the alpha channel.
  124. primary: '#236a97',
  125. primarya40: 'rgba(35, 107, 151, 0.40)',
  126. primary400: '#297BAE',
  127. info50: '#ECF6FE',
  128. info100: '#D9EDF7',
  129. info200: '#B1DFF3',
  130. info400: '#4B9FD5',
  131. info500: '#0271B9',
  132. success300: '#6CD46C',
  133. success300a20: 'rgba(108, 212, 108, 0.2)',
  134. success500: '#008223',
  135. success500a20: 'rgba(0, 138, 37, 0.20)',
  136. successVariant: '#C6E056',
  137. successVarianta20: 'rgba(198, 224, 86, 0.2)',
  138. successVariantDark: '#809E00',
  139. warning: '#B95E04',
  140. warningVariant: '#F4D348',
  141. warningVarianta20: 'rgba(244, 211, 72, 0.2)',
  142. warningVariantDark: '#B18F00',
  143. warningAccent: '#F69D53',
  144. warningAccenta20: 'rgba(246, 157, 83, 0.2)',
  145. error400: '#F0878E',
  146. error400a20: 'rgba(240, 135, 142, 0.2)',
  147. error500: '#D02F3A',
  148. error500a20: 'rgba(208, 47, 58, 0.20)',
  149. error700: '#B81723',
  150. neutral50: '#F3F3F3',
  151. neutral200: '#CCCCCC',
  152. neutral600: '#666666',
  153. neutral800: '#333333',
  154. white: '#FFFFFF',
  155. whitea18: 'rgba(255, 255, 255, 0.18)',
  156. whitea60: 'rgba(255, 255, 255, 0.60)',
  157. black: '#000000',
  158. blacka06: 'rgba(0, 0, 0, 0.06)',
  159. blacka38: 'rgba(0, 0, 0, 0.38)',
  160. blacka60: 'rgba(0, 0, 0, 0.60)',
  161. blacka75: 'rgba(0, 0, 0, 0.75)',
  162. blacka87: 'rgba(0, 0, 0, 0.87)',
  163. },
  164. sizes: {
  165. gridSize: `${grid}px`,
  166. baseFontSize: `${baseFontSizeRaw}px`,
  167. verySmallFontSize: '10px',
  168. smallFontSize: '12px',
  169. mediumFontSize: '14px',
  170. bigFontSize: '16px',
  171. veryBigFontSize: '18px',
  172. hugeFontSize: '24px',
  173. giganticFontSize: '36px',
  174. hugeControlHeight: `${5 * grid}px`,
  175. largeControlHeight: `${4 * grid}px`,
  176. controlHeight: `${3 * grid}px`,
  177. smallControlHeight: `${2.5 * grid}px`,
  178. tinyControlHeight: `${2 * grid}px`,
  179. globalNavHeight: `${6 * grid}px`,
  180. globalNavContentHeight: `${4 * grid}px`,
  181. pagePadding: '20px',
  182. },
  183. rawSizes: {
  184. grid,
  185. baseFontSizeRaw,
  186. globalNavHeightRaw: 6 * grid,
  187. globalNavContentHeightRaw: 4 * grid,
  188. contextNavHeightRaw: 9 * grid,
  189. },
  190. fonts: {
  191. baseFontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
  192. systemFontFamily: "-apple-system,'BlinkMacSystemFont','Helvetica','Arial',sans-serif",
  193. sourceCodeFontFamily: "Consolas, 'Ubuntu Mono', 'Liberation Mono', Menlo, Courier, monospace",
  194. },
  195. // z-index
  196. // =======
  197. // 1 - 100 for page elements (e.g. sidebars, panels)
  198. // 101 - 500 for generic page fixed elements (e.g. navigation, workspace)
  199. // 501 - 3000 for page ui elements
  200. // 3001 - 8000 for generic ui elements (e.g. dropdowns, tooltips)
  201. zIndexes: {
  202. // common
  203. aboveNormalZIndex: '3',
  204. normalZIndex: '2',
  205. belowNormalZIndex: '1',
  206. // ui elements
  207. pageMainZIndex: '50',
  208. pageSideZIndex: '50',
  209. pageHeaderZIndex: '55',
  210. globalBannerZIndex: '60',
  211. contextbarZIndex: '420',
  212. tooltipZIndex: '9001',
  213. dropdownMenuZIndex: '7500',
  214. processContainerZIndex: '7000',
  215. modalZIndex: '6001',
  216. modalOverlayZIndex: '6000',
  217. popupZIndex: '5000',
  218. },
  219. others: {
  220. defaultShadow: '0 6px 12px rgba(0, 0, 0, 0.175)',
  221. },
  222. };