theme.py 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. # Copyright (c) 2010-2024 openpyxl
  2. """Write the theme xml based on a fixed string."""
  3. theme_xml = """<?xml version="1.0"?>
  4. <a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">
  5. <a:themeElements>
  6. <a:clrScheme name="Office">
  7. <a:dk1>
  8. <a:sysClr val="windowText" lastClr="000000"/>
  9. </a:dk1>
  10. <a:lt1>
  11. <a:sysClr val="window" lastClr="FFFFFF"/>
  12. </a:lt1>
  13. <a:dk2>
  14. <a:srgbClr val="1F497D"/>
  15. </a:dk2>
  16. <a:lt2>
  17. <a:srgbClr val="EEECE1"/>
  18. </a:lt2>
  19. <a:accent1>
  20. <a:srgbClr val="4F81BD"/>
  21. </a:accent1>
  22. <a:accent2>
  23. <a:srgbClr val="C0504D"/>
  24. </a:accent2>
  25. <a:accent3>
  26. <a:srgbClr val="9BBB59"/>
  27. </a:accent3>
  28. <a:accent4>
  29. <a:srgbClr val="8064A2"/>
  30. </a:accent4>
  31. <a:accent5>
  32. <a:srgbClr val="4BACC6"/>
  33. </a:accent5>
  34. <a:accent6>
  35. <a:srgbClr val="F79646"/>
  36. </a:accent6>
  37. <a:hlink>
  38. <a:srgbClr val="0000FF"/>
  39. </a:hlink>
  40. <a:folHlink>
  41. <a:srgbClr val="800080"/>
  42. </a:folHlink>
  43. </a:clrScheme>
  44. <a:fontScheme name="Office">
  45. <a:majorFont>
  46. <a:latin typeface="Cambria"/>
  47. <a:ea typeface=""/>
  48. <a:cs typeface=""/>
  49. <a:font script="Jpan" typeface="&#xFF2D;&#xFF33; &#xFF30;&#x30B4;&#x30B7;&#x30C3;&#x30AF;"/>
  50. <a:font script="Hang" typeface="&#xB9D1;&#xC740; &#xACE0;&#xB515;"/>
  51. <a:font script="Hans" typeface="&#x5B8B;&#x4F53;"/>
  52. <a:font script="Hant" typeface="&#x65B0;&#x7D30;&#x660E;&#x9AD4;"/>
  53. <a:font script="Arab" typeface="Times New Roman"/>
  54. <a:font script="Hebr" typeface="Times New Roman"/>
  55. <a:font script="Thai" typeface="Tahoma"/>
  56. <a:font script="Ethi" typeface="Nyala"/>
  57. <a:font script="Beng" typeface="Vrinda"/>
  58. <a:font script="Gujr" typeface="Shruti"/>
  59. <a:font script="Khmr" typeface="MoolBoran"/>
  60. <a:font script="Knda" typeface="Tunga"/>
  61. <a:font script="Guru" typeface="Raavi"/>
  62. <a:font script="Cans" typeface="Euphemia"/>
  63. <a:font script="Cher" typeface="Plantagenet Cherokee"/>
  64. <a:font script="Yiii" typeface="Microsoft Yi Baiti"/>
  65. <a:font script="Tibt" typeface="Microsoft Himalaya"/>
  66. <a:font script="Thaa" typeface="MV Boli"/>
  67. <a:font script="Deva" typeface="Mangal"/>
  68. <a:font script="Telu" typeface="Gautami"/>
  69. <a:font script="Taml" typeface="Latha"/>
  70. <a:font script="Syrc" typeface="Estrangelo Edessa"/>
  71. <a:font script="Orya" typeface="Kalinga"/>
  72. <a:font script="Mlym" typeface="Kartika"/>
  73. <a:font script="Laoo" typeface="DokChampa"/>
  74. <a:font script="Sinh" typeface="Iskoola Pota"/>
  75. <a:font script="Mong" typeface="Mongolian Baiti"/>
  76. <a:font script="Viet" typeface="Times New Roman"/>
  77. <a:font script="Uigh" typeface="Microsoft Uighur"/>
  78. </a:majorFont>
  79. <a:minorFont>
  80. <a:latin typeface="Calibri"/>
  81. <a:ea typeface=""/>
  82. <a:cs typeface=""/>
  83. <a:font script="Jpan" typeface="&#xFF2D;&#xFF33; &#xFF30;&#x30B4;&#x30B7;&#x30C3;&#x30AF;"/>
  84. <a:font script="Hang" typeface="&#xB9D1;&#xC740; &#xACE0;&#xB515;"/>
  85. <a:font script="Hans" typeface="&#x5B8B;&#x4F53;"/>
  86. <a:font script="Hant" typeface="&#x65B0;&#x7D30;&#x660E;&#x9AD4;"/>
  87. <a:font script="Arab" typeface="Arial"/>
  88. <a:font script="Hebr" typeface="Arial"/>
  89. <a:font script="Thai" typeface="Tahoma"/>
  90. <a:font script="Ethi" typeface="Nyala"/>
  91. <a:font script="Beng" typeface="Vrinda"/>
  92. <a:font script="Gujr" typeface="Shruti"/>
  93. <a:font script="Khmr" typeface="DaunPenh"/>
  94. <a:font script="Knda" typeface="Tunga"/>
  95. <a:font script="Guru" typeface="Raavi"/>
  96. <a:font script="Cans" typeface="Euphemia"/>
  97. <a:font script="Cher" typeface="Plantagenet Cherokee"/>
  98. <a:font script="Yiii" typeface="Microsoft Yi Baiti"/>
  99. <a:font script="Tibt" typeface="Microsoft Himalaya"/>
  100. <a:font script="Thaa" typeface="MV Boli"/>
  101. <a:font script="Deva" typeface="Mangal"/>
  102. <a:font script="Telu" typeface="Gautami"/>
  103. <a:font script="Taml" typeface="Latha"/>
  104. <a:font script="Syrc" typeface="Estrangelo Edessa"/>
  105. <a:font script="Orya" typeface="Kalinga"/>
  106. <a:font script="Mlym" typeface="Kartika"/>
  107. <a:font script="Laoo" typeface="DokChampa"/>
  108. <a:font script="Sinh" typeface="Iskoola Pota"/>
  109. <a:font script="Mong" typeface="Mongolian Baiti"/>
  110. <a:font script="Viet" typeface="Arial"/>
  111. <a:font script="Uigh" typeface="Microsoft Uighur"/>
  112. </a:minorFont>
  113. </a:fontScheme>
  114. <a:fmtScheme name="Office">
  115. <a:fillStyleLst>
  116. <a:solidFill>
  117. <a:schemeClr val="phClr"/>
  118. </a:solidFill>
  119. <a:gradFill rotWithShape="1">
  120. <a:gsLst>
  121. <a:gs pos="0">
  122. <a:schemeClr val="phClr">
  123. <a:tint val="50000"/>
  124. <a:satMod val="300000"/>
  125. </a:schemeClr>
  126. </a:gs>
  127. <a:gs pos="35000">
  128. <a:schemeClr val="phClr">
  129. <a:tint val="37000"/>
  130. <a:satMod val="300000"/>
  131. </a:schemeClr>
  132. </a:gs>
  133. <a:gs pos="100000">
  134. <a:schemeClr val="phClr">
  135. <a:tint val="15000"/>
  136. <a:satMod val="350000"/>
  137. </a:schemeClr>
  138. </a:gs>
  139. </a:gsLst>
  140. <a:lin ang="16200000" scaled="1"/>
  141. </a:gradFill>
  142. <a:gradFill rotWithShape="1">
  143. <a:gsLst>
  144. <a:gs pos="0">
  145. <a:schemeClr val="phClr">
  146. <a:shade val="51000"/>
  147. <a:satMod val="130000"/>
  148. </a:schemeClr>
  149. </a:gs>
  150. <a:gs pos="80000">
  151. <a:schemeClr val="phClr">
  152. <a:shade val="93000"/>
  153. <a:satMod val="130000"/>
  154. </a:schemeClr>
  155. </a:gs>
  156. <a:gs pos="100000">
  157. <a:schemeClr val="phClr">
  158. <a:shade val="94000"/>
  159. <a:satMod val="135000"/>
  160. </a:schemeClr>
  161. </a:gs>
  162. </a:gsLst>
  163. <a:lin ang="16200000" scaled="0"/>
  164. </a:gradFill>
  165. </a:fillStyleLst>
  166. <a:lnStyleLst>
  167. <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr">
  168. <a:solidFill>
  169. <a:schemeClr val="phClr">
  170. <a:shade val="95000"/>
  171. <a:satMod val="105000"/>
  172. </a:schemeClr>
  173. </a:solidFill>
  174. <a:prstDash val="solid"/>
  175. </a:ln>
  176. <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr">
  177. <a:solidFill>
  178. <a:schemeClr val="phClr"/>
  179. </a:solidFill>
  180. <a:prstDash val="solid"/>
  181. </a:ln>
  182. <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr">
  183. <a:solidFill>
  184. <a:schemeClr val="phClr"/>
  185. </a:solidFill>
  186. <a:prstDash val="solid"/>
  187. </a:ln>
  188. </a:lnStyleLst>
  189. <a:effectStyleLst>
  190. <a:effectStyle>
  191. <a:effectLst>
  192. <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0">
  193. <a:srgbClr val="000000">
  194. <a:alpha val="38000"/>
  195. </a:srgbClr>
  196. </a:outerShdw>
  197. </a:effectLst>
  198. </a:effectStyle>
  199. <a:effectStyle>
  200. <a:effectLst>
  201. <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0">
  202. <a:srgbClr val="000000">
  203. <a:alpha val="35000"/>
  204. </a:srgbClr>
  205. </a:outerShdw>
  206. </a:effectLst>
  207. </a:effectStyle>
  208. <a:effectStyle>
  209. <a:effectLst>
  210. <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0">
  211. <a:srgbClr val="000000">
  212. <a:alpha val="35000"/>
  213. </a:srgbClr>
  214. </a:outerShdw>
  215. </a:effectLst>
  216. <a:scene3d>
  217. <a:camera prst="orthographicFront">
  218. <a:rot lat="0" lon="0" rev="0"/>
  219. </a:camera>
  220. <a:lightRig rig="threePt" dir="t">
  221. <a:rot lat="0" lon="0" rev="1200000"/>
  222. </a:lightRig>
  223. </a:scene3d>
  224. <a:sp3d>
  225. <a:bevelT w="63500" h="25400"/>
  226. </a:sp3d>
  227. </a:effectStyle>
  228. </a:effectStyleLst>
  229. <a:bgFillStyleLst>
  230. <a:solidFill>
  231. <a:schemeClr val="phClr"/>
  232. </a:solidFill>
  233. <a:gradFill rotWithShape="1">
  234. <a:gsLst>
  235. <a:gs pos="0">
  236. <a:schemeClr val="phClr">
  237. <a:tint val="40000"/>
  238. <a:satMod val="350000"/>
  239. </a:schemeClr>
  240. </a:gs>
  241. <a:gs pos="40000">
  242. <a:schemeClr val="phClr">
  243. <a:tint val="45000"/>
  244. <a:shade val="99000"/>
  245. <a:satMod val="350000"/>
  246. </a:schemeClr>
  247. </a:gs>
  248. <a:gs pos="100000">
  249. <a:schemeClr val="phClr">
  250. <a:shade val="20000"/>
  251. <a:satMod val="255000"/>
  252. </a:schemeClr>
  253. </a:gs>
  254. </a:gsLst>
  255. <a:path path="circle">
  256. <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/>
  257. </a:path>
  258. </a:gradFill>
  259. <a:gradFill rotWithShape="1">
  260. <a:gsLst>
  261. <a:gs pos="0">
  262. <a:schemeClr val="phClr">
  263. <a:tint val="80000"/>
  264. <a:satMod val="300000"/>
  265. </a:schemeClr>
  266. </a:gs>
  267. <a:gs pos="100000">
  268. <a:schemeClr val="phClr">
  269. <a:shade val="30000"/>
  270. <a:satMod val="200000"/>
  271. </a:schemeClr>
  272. </a:gs>
  273. </a:gsLst>
  274. <a:path path="circle">
  275. <a:fillToRect l="50000" t="50000" r="50000" b="50000"/>
  276. </a:path>
  277. </a:gradFill>
  278. </a:bgFillStyleLst>
  279. </a:fmtScheme>
  280. </a:themeElements>
  281. <a:objectDefaults/>
  282. <a:extraClrSchemeLst/>
  283. </a:theme>
  284. """
  285. def write_theme():
  286. """Write the theme xml."""
  287. return theme_xml