colors.yaml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. Name: Wiki Colors
  2. Directory: colors
  3. Style: |-
  4. #color-table {
  5. width: 100%;
  6. border-spacing: 3px 6px;
  7. }
  8. #color-table td, #color-table th {
  9. border: 2px solid var(--primary-color);
  10. border-top: 1px dotted var(--primary-color);
  11. border-bottom: 1px dotted var(--primary-color);
  12. padding: 4px 8px;
  13. }
  14. #color-table td:nth-child(1),
  15. #color-table td:nth-child(2) {
  16. text-align: center;
  17. transition: background 0.35s, color 0.35s;
  18. }
  19. #color-table td:nth-child(1) {
  20. width: 140px;
  21. }
  22. #color-table td:nth-child(2) {
  23. width: 80px;
  24. }
  25. #color-table td:nth-child(2):not(.nolight):hover {
  26. background: white;
  27. color: black;
  28. }
  29. #color-table td:nth-child(3) a {
  30. display: inline-block;
  31. }
  32. #color-table code {
  33. white-space: nowrap;
  34. }
  35. #color-table span[title] {
  36. text-decoration: underline;
  37. text-decoration-style: dotted;
  38. text-decoration-color: var(--primary-color);
  39. }
  40. Script: |-
  41. const table = document.getElementById('color-table');
  42. function findReplaceTextNodes(container, regex, replace) {
  43. function recursive(parent) {
  44. for (const node of [...parent.childNodes]) {
  45. if (node.nodeType === document.ELEMENT_NODE) {
  46. recursive(node);
  47. } else if (node.nodeType === document.TEXT_NODE) {
  48. text(node);
  49. }
  50. }
  51. }
  52. function text(node) {
  53. const nodes = [], content = node.textContent;
  54. const parent = node.parentElement;
  55. let match = null, previous = 0;
  56. for (const match of content.matchAll(regex)) {
  57. nodes.push(content.slice(previous, match.index));
  58. nodes.push(replace(...match));
  59. previous = match.index + match[0].length;
  60. }
  61. nodes.push(content.slice(previous));
  62. node.replaceWith(...nodes);
  63. }
  64. recursive(container);
  65. }
  66. const getColor = el => el.innerText.match(/#[0-9a-f]{3,8}/i);
  67. for (const row of table.querySelectorAll('tbody tr')) {
  68. const color = getColor(row.querySelector('td'));
  69. if (color) row.style.setProperty('--primary-color', color);
  70. findReplaceTextNodes(row,
  71. /#[0-9a-f]{3,8}/gi, match => {
  72. const elem = document.createElement('code');
  73. elem.style.color = match;
  74. elem.innerText = match;
  75. return elem;
  76. });
  77. findReplaceTextNodes(row,
  78. /\(same\)/g, match => {
  79. const elem = document.createElement('span');
  80. elem.style.color = color;
  81. elem.innerText = match;
  82. return elem;
  83. });
  84. for (const cell of row.querySelectorAll('td:not(:first-child)')) {
  85. const color = getColor(cell);
  86. if (color) cell.style.setProperty('--primary-color', color);
  87. }
  88. }
  89. Content: |-
  90. Here's a list of some colors used on the wiki which are pulled specifically from Homestuck! These could come in handy if you want to copy-paste them into new data entries, or make something that matches common colors on the wiki.
  91. This page is only updated manually, so it could be missing updated tag colors or more recent example uses.
  92. Thanks to [MS Paint Adventures Wiki](https://mspaintadventures.fandom.com/) for having an awesome [Template:Color](https://mspaintadventures.fandom.com/wiki/Template:Color) reference we've used many times!
  93. <table id="color-table" style="--primary-color: #e0e0e0">
  94. <thead>
  95. <tr>
  96. <th>Tag + Color</th>
  97. <th>Source Color</th>
  98. <th>Example Uses</th>
  99. </tr>
  100. </thead>
  101. <tbody>
  102. <tr><td>[[tag:john]]<br>#5c66e8</td>
  103. <td>#0715cd</td>
  104. <td>-</td>
  105. <tr><td>[[tag:rose]]<br>#b536da</td>
  106. <td>(same)</td>
  107. <td>[[flash-act:a4]],
  108. [[album:homestuck-vol-7]],
  109. [[album:cool-and-new-greatest-hits]]</td>
  110. <tr><td>[[tag:dave]]<br>#e00707</td>
  111. <td>(same)</td>
  112. <td>[[flash-act:a6i2]]</td>
  113. <tr><td>[[tag:jade]]<br>#4ac925</td>
  114. <td>(same)</td>
  115. <td>[[album:homestuck-vol-8]]</td>
  116. <tr><td>[[tag:jane]]<br>#00d5f2</td>
  117. <td><span title="Homestuck">(same)</span>,
  118. <span title="Epilogues">#0097d7</span></td>
  119. <td>-</td>
  120. <tr><td>[[tag:roxy]]<br>#ff6ff2</td>
  121. <td>(same)</td>
  122. <td>-</td>
  123. <tr><td>[[tag:dirk]]<br>#f2a400</td>
  124. <td>(same)</td>
  125. <td>[[flash-act:a6a2]],
  126. [[album:beyond-canon]],
  127. [[album:homestuck-vol-9]],
  128. [[album:diverging-delicacies]]</td>
  129. <tr><td>[[tag:jake]]<br>#1f9400</td>
  130. <td>(same)</td>
  131. <td>-</td>
  132. <tr><td>[[tag:aradia]]<br>#eb0000</td>
  133. <td>#a10000</td>
  134. <td>[[flash-act:a6i1]], [[album:rust-apocalypse]]</td>
  135. <tr><td>[[tag:tavros]]<br>#c36100</td>
  136. <td>#a15000</td>
  137. <td>-</td>
  138. <tr><td>[[tag:sollux]]<br>#a1a100</td>
  139. <td>(same)</td>
  140. <td>-</td>
  141. <tr><td>[[tag:karkat]]<br>#7c7e81</td>
  142. <td><span title="Homestuck">#626262</span>,
  143. <span title="Epilogues">(same)</span></td>
  144. <td>[[flash-act:karkat-goes-to-a-convention]]</td>
  145. <tr><td>[[tag:kankri]]<br>#ff0000</td>
  146. <td>(same)</td>
  147. <td>It's the color red...</td>
  148. <tr><td>[[tag:nepeta]]<br>#588a00</td>
  149. <td>#416600</td>
  150. <td>-</td>
  151. <tr><td>[[tag:kanaya]]<br>#008f48</td>
  152. <td>#008141</td>
  153. <td>-</td>
  154. <tr><td>[[tag:terezi]]<br>#008b8b</td>
  155. <td>#008282</td>
  156. <td>-</td>
  157. <tr><td>[[tag:vriska]]<br>#3796c6</td>
  158. <td>#005682</td>
  159. <td>-</td>
  160. <tr><td>[[tag:equius]]<br>#487aef</td>
  161. <td>#000056</td>
  162. <td>-</td>
  163. <tr><td>[[tag:gamzee]]<br>#a34bff</td>
  164. <td>#2b0057</td>
  165. <td>[[album:toxic-love]],
  166. [[album:capricious-mistress-single]]</td>
  167. <tr><td>[[tag:eridan]]<br>#db00db</td>
  168. <td>#6a006a</td>
  169. <td>-</td>
  170. <tr><td>[[tag:feferi]]<br>#e30072</td>
  171. <td>#77003c</td>
  172. <td>-</td>
  173. <tr><td>[[tag:calliope]]<br>#00e500</td>
  174. <td><span title="Homestuck">#929292</span>,
  175. <span title="Epilogues">#a1a3a6</span>,
  176. <span title="Blood color">#2ed73a</span></td>
  177. <td>[[track:reverie]], [[track:candy-epilogue]]</td>
  178. <tr><td>[[tag:caliborn]]<br>#e50000</td>
  179. <td><span title="Homestuck">#323232</span>
  180. <span title="Epilogues">#009c68</span>
  181. <span title="Blood color">#ff0000</span></td>
  182. <td>[[track:carne-vale]], [[track:meat-epilogue]]</td>
  183. <tr><td>[[tag:lord-english]]<br>#2ed73a</td>
  184. <td>(same)</td>
  185. <td>Also [[tag:lil-cal]];
  186. [[flash-act:a5a2]]</td>
  187. <tr><td>[[tag:johns-dad]]<br>#e0e0e0</td>
  188. <td>#4b4b4b</td>
  189. <td>Also used for first guardians and assorted "colorless" characters, such as [[tag:snowman]], [[tag:mspa-reader]], [[tag:wv]], [[tag:serenity]]</td>
  190. <tr><td>[[tag:joey]]<br>#41a455</td>
  191. <td class="nolight">#71daff</td>
  192. <td>-</td>
  193. <tr><td>[[tag:jude]]<br>#06c9cc</td>
  194. <td class="nolight">#d3ff8f</td>
  195. <td>-</td>
  196. <tr><td>[[tag:harry]]<br>#0671cd</td>
  197. <td>(same)</td>
  198. <td>-</td>
  199. <tr><td>[[tag:tavvy]]<br>#a44bff</td>
  200. <td>#2b0057</td>
  201. <td>-</td>
  202. <tr><td>[[tag:horrorterrors]]<br>#b678ce</td>
  203. <td>#4d006d</td>
  204. <td>-</td>
  205. <tr><td>[[tag:prospit]]<br>#ffff01</td>
  206. <td><span title="Prospit">#e49700</span>,
  207. <span title="Prospit symbol">(same)</span></td>
  208. <td>Also [[tag:mobius-trip]]</td>
  209. <tr><td>[[tag:derse]]<br>#ff01fe</td>
  210. <td><span title="Derse">#9700e4</span>,
  211. <span title="Derse symbol">(same)</span></td>
  212. <td>Also [[tag:hadron-kaleido]]</td>
  213. </tbody>
  214. </table>