@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at upstream/main 320 lines 12 kB view raw
1<?php 2 3final class CelerityDarkModePostprocessor 4 extends CelerityPostprocessor { 5 6 public function getPostprocessorKey() { 7 return 'darkmode'; 8 } 9 10 public function getPostprocessorName() { 11 return pht('Dark Mode (Experimental)'); 12 } 13 14 public function buildVariables() { 15 return array( 16 17 // Fonts 18 'basefont' => "13px 'Segoe UI', 'Segoe UI Emoji', ". 19 "'Segoe UI Symbol', 'Lato', 'Helvetica Neue', ". 20 "Helvetica, Arial, sans-serif", 21 22 'fontfamily' => "'Segoe UI', 'Segoe UI Emoji', ". 23 "'Segoe UI Symbol', 'Lato', 'Helvetica Neue', ". 24 "Helvetica, Arial, sans-serif", 25 26 // Drop Shadow 27 'dropshadow' => '0 2px 12px rgba(0, 0, 0, .20)', 28 29 // Anchors 30 'anchor' => '#46b2ff', 31 32 // Base Colors 33 'red' => '#c0392b', 34 'lightred' => '#7f261c', 35 'orange' => '#e67e22', 36 'lightorange' => '#f7e2d4', 37 'yellow' => '#f1c40f', 38 'lightyellow' => '#a4850a', 39 'green' => '#139543', 40 'lightgreen' => '#0e7032', 41 'blue' => '#2980b9', 42 'lightblue' => '#1d5981', 43 'sky' => '#3498db', 44 'lightsky' => '#175782', 45 'fire' => '#e62f17', 46 'indigo' => '#6e5cb6', 47 'lightindigo' => '#372574', 48 'pink' => '#da49be', 49 'lightpink' => '#81186d', 50 'violet' => '#8e44ad', 51 'lightviolet' => '#622f78', 52 'charcoal' => '#4b4d51', 53 'backdrop' => '#c4cde0', 54 'hoverwhite' => 'rgba(255,255,255,.6)', 55 'hovergrey' => '#c5cbcf', 56 'hoverblue' => '#2a425f', 57 'hoverborder' => '#dfe1e9', 58 'hoverselectedgrey' => '#4f5b64', 59 'hoverselectedblue' => '#48546a', 60 'borderinset' => 'inset 0 0 0 1px rgba(55,55,55,.15)', 61 'timeline' => '#4e6078', 62 'timeline.icon.background' => '#416086', 63 'bluepropertybackground' => '#2d435f', 64 65 // Alphas 66 'alphawhite' => '255,255,255', 67 'alphagrey' => '255,255,255', 68 'alphablue' => '255,255,255', 69 'alphablack' => '0,0,0', 70 71 // Base Greys 72 'lightgreyborder' => 'rgba(255,255,255,.3)', 73 'greyborder' => 'rgba(255,255,255,.6)', 74 'darkgreyborder' => 'rgba(255,255,255,.9)', 75 'lightgreytext' => 'rgba(255,255,255,.3)', 76 'greytext' => 'rgba(255,255,255,.6)', 77 'darkgreytext' => 'rgba(255,255,255,.9)', 78 'lightgreybackground' => '#2a425f', 79 'greybackground' => '#304a6d', 80 'darkgreybackground' => '#8C98B8', 81 82 // Base Blues 83 'thinblueborder' => '#2c405a', 84 'lightblueborder' => '#3e5675', 85 'blueborder' => '#8C98B8', 86 'darkblueborder' => '#626E82', 87 'lightbluebackground' => 'rgba(255,255,255,.05)', 88 'bluebackground' => 'rgba(255,255,255,.1)', 89 'lightbluetext' => 'rgba(255,255,255,.3)', 90 'bluetext' => 'rgba(255,255,255,.6)', 91 'darkbluetext' => 'rgba(255,255,255,.8)', 92 'blacktext' => 'rgba(255,255,255,.9)', 93 94 // Base Greens 95 'lightgreenborder' => '#105610', 96 'greenborder' => '#446f54', 97 'greentext' => '#e0eedd', 98 'lightgreenbackground' => '#132211', 99 100 // Base Red 101 'lightredborder' => '#561010', 102 'redborder' => '#6b1414', 103 'redtext' => '#f2d9d9', 104 'lightredbackground' => '#260d0d', 105 106 // Base Yellow 107 'lightyellowborder' => '#565610', 108 'yellowborder' => '#707042', 109 'yellowtext' => '#ededde', 110 'lightyellowbackground' => '#31311b', 111 112 // Base Violet 113 'lightvioletborder' => '#331056', 114 'violetborder' => '#6c4270', 115 'violettext' => '#e8deed', 116 'lightvioletbackground' => '#2a1a32', 117 118 // Shades are a more muted set of our base colors 119 // better suited to blending into other UIs. 120 121 // Shade Red 122 'sh-lightredborder' => '#7b1e1e', 123 'sh-redborder' => '#8d3f3f', 124 'sh-redicon' => '#ff9999', 125 'sh-redtext' => '#ffcccc', 126 'sh-redbackground' => '#563636', 127 128 // Shade Orange 129 'sh-lightorangeborder' => '#7b4d1e', 130 'sh-orangeborder' => '#8d663f', 131 'sh-orangeicon' => '#ffcc99', 132 'sh-orangetext' => '#ffe6cc', 133 'sh-orangebackground' => '#554535', 134 135 // Shade Yellow 136 'sh-lightyellowborder' => '#7b7b1e', 137 'sh-yellowborder' => '#8d8d3f', 138 'sh-yellowicon' => '#ffff99', 139 'sh-yellowtext' => '#ffffcc', 140 'sh-yellowbackground' => '#555535', 141 142 // Shade Green 143 'sh-lightgreenborder' => '#357b1e', 144 'sh-greenborder' => '#538d3f', 145 'sh-greenicon' => '#99ff99', 146 'sh-greentext' => '#d9ffcc', 147 'sh-greenbackground' => '#355535', 148 149 // Shade Blue 150 'sh-lightblueborder' => '#1e4d7b', 151 'sh-blueborder' => '#3f668d', 152 'sh-blueicon' => '#99ccff', 153 'sh-bluetext' => '#cce6ff', 154 'sh-bluebackground' => '#353d55', 155 156 // Shade Sky (mostly re-uses Blue colors above) 157 'sh-skybackground' => '#354d55', 158 159 // Shade Indigo 160 'sh-lightindigoborder' => '#1e1e7b', 161 'sh-indigoborder' => '#3f3f8d', 162 'sh-indigoicon' => '#9999ff', 163 'sh-indigotext' => '#ccccff', 164 'sh-indigobackground' => '#3d3555', 165 166 // Shade Violet 167 'sh-lightvioletborder' => '#4d1e7b', 168 'sh-violetborder' => '#663f8d', 169 'sh-violeticon' => '#cc99ff', 170 'sh-violettext' => '#e6ccff', 171 'sh-violetbackground' => '#4d3555', 172 173 // Shade Pink 174 'sh-lightpinkborder' => '#7b1e7b', 175 'sh-pinkborder' => '#8d3f8d', 176 'sh-pinkicon' => '#ff99ff', 177 'sh-pinktext' => '#ffccff', 178 'sh-pinkbackground' => '#553555', 179 180 // Shade Grey 181 'sh-lightgreyborder' => '#737373', 182 'sh-greyborder' => '#b9bbc6', 183 'sh-greyicon' => '#4d4d4d', 184 'sh-greytext' => '#262626', 185 'sh-greybackground' => '#979db4', 186 187 // Shade Disabled 188 'sh-lightdisabledborder' => '#1a1a1a', 189 'sh-disabledborder' => '#333333', 190 'sh-disabledicon' => '#595959', 191 'sh-disabledtext' => '#737373', 192 'sh-disabledbackground' => '#223144', 193 194 // Shade Checkered 195 'sh-checkeredtext' => '#bbbbbb', 196 'sh-checkeredicon' => '#979db4', 197 198 // Diffs 199 'diff.background' => '#121b27', 200 'new-background' => 'rgba(213, 246, 213, .2)', 201 'new-bright' => 'rgba(24, 129, 24, .8)', 202 'old-background' => 'rgba(252, 207, 207, .2)', 203 'old-bright' => 'rgba(144, 9, 9, .7)', 204 'move-background' => '#614f05', 205 'copy-background' => '#f1c40f', 206 207 'diffsize.small.background' => '#324d67', 208 'diffsize.large.background' => '#4b3826', 209 'diffsize.small.icon' => '#cadce7', 210 'diffsize.large.icon' => '#f2d7c0', 211 212 'diff.update-history-new' => '#226622', 213 'diff.update-history-new-now' => '#155815', 214 'diff.update-history-old' => '#a65353', 215 'diff.update-history-old-now' => '#903e3e', 216 217 // Usually light yellow 218 'gentle.highlight' => '#105356', 219 'gentle.highlight.border' => '#0c3e40', 220 221 'paste.content' => '#222222', 222 'paste.border' => '#000000', 223 'paste.highlight' => '#121212', 224 225 // Background color for "most" themes. 226 'page.background' => '#223246', 227 'page.sidenav' => '#1c293b', 228 'page.content' => '#26374c', 229 230 'menu.profile.text' => 'rgba(255,255,255,.8)', 231 'menu.profile.text.selected' => 'rgba(255,255,255,1)', 232 'menu.profile.icon.disabled' => 'rgba(255,255,255,.4)', 233 234 'navigation-menu-selection-background' => 'rgba(255, 255, 255,.2)', 235 'navigation-menu-hover-background' => 'rgba(255,255,255,.1)', 236 'workboard-column-background' => 'rgba(60,90,120,.55)', 237 'form-inset-background' => '#1c293b', 238 239 // Buttons 240 'blue.button.color' => '#2980b9', 241 'blue.button.gradient' => 'linear-gradient(to bottom, #3498db, #2980b9)', 242 'green.button.color' => '#139543', 243 'green.button.gradient' => 'linear-gradient(to bottom, #23BB5B, #139543)', 244 'grey.button.color' => '#223246', 245 'grey.button.gradient' => 'linear-gradient(to bottom, #223246, #223246)', 246 'grey.button.hover' => 'linear-gradient(to bottom, #1c293b, #1c293b)', 247 248 // Checkerboard patterns 249 'checker.light-one' => '#223246', 250 'checker.light-two' => '#0d0d0d', 251 'checker.lighter-one' => '#292929', 252 'checker.lighter-two' => '#26374c', 253 'checker.dark-one' => '#cccccc', 254 'checker.dark-two' => '#f3f3f3', 255 256 // Codeblock syntax highlighting 257 'syntax.highlighted-line' => '#fa8', 258 'syntax.comment' => '#6d6', 259 'syntax.comment-multiline' => '#6d6', 260 'syntax.comment-single' => '#6d6', 261 'syntax.comment-special' => '#6d6', 262 'syntax.string-doc' => '#fff', 263 'syntax.string-heredoc' => '#fff', 264 'syntax.string' => '#ffb3b3', 265 'syntax.string-backtick' => '#ffb3b3', 266 'syntax.literal-string-char' => '#ffb3b3', 267 'syntax.string-double' => '#ffb3b3', 268 'syntax.string-single' => '#ffb3b3', 269 'syntax.string-other' => '#ffb3b3', 270 'syntax.string-regex' => '#ffb3b3', 271 'syntax.name-variable' => '#b3ffff', 272 'syntax.variable-instance' => '#b3ffff', 273 'syntax.variable-global' => '#b3ffff', 274 'syntax.name-attribute' => '#4cf', 275 'syntax.keyword-constant' => '#0cf', 276 'syntax.name-operator' => '#0cf', 277 'syntax.keyword' => '#f2a6f2', 278 'syntax.keyword-declaration' => '#f2a6f2', 279 'syntax.keyword-namespace' => '#f2a6f2', 280 'syntax.keyword-type' => '#f2a6f2', 281 'syntax.comment-preproc' => '#08f', 282 'syntax.keyword-preproc' => '#08f', 283 'syntax.keyword-reserved' => '#08f', 284 'syntax.name-builtin' => '#08f', 285 'syntax.builtin-pseudo' => '#08f', 286 'syntax.name-class' => '#4ff', 287 'syntax.name-tag' => '#dc0', 288 'syntax.name-variable-class' => '#4ff', 289 'syntax.name-function' => '#8af', 290 'syntax.name-exception' => '#ed8', 291 'syntax.operator' => '#aaa', 292 'syntax.punctuation' => '#aaa', 293 'syntax.literal-string-symbol' => '#aaa', 294 'syntax.literal-number' => '#fa4', 295 'syntax.literal-number-float' => '#fa4', 296 'syntax.literal-number-hex' => '#fa4', 297 'syntax.literal-number-integer' => '#fa4', 298 'syntax.literal-number-octal' => '#fa4', 299 'syntax.literal-number-integer-long' => '#fa4', 300 'syntax.generic-deleted' => '#f55', 301 'syntax.generic-red' => '#f52', 302 'syntax.generic-heading' => '#fff', 303 'syntax.generic-inserted' => '#4f4', 304 'syntax.generic-output' => '#ccc', 305 'syntax.generic-prompt' => '#fff', 306 'syntax.generic-underline' => '#f4f', 307 'syntax.generic-traceback' => '#07f', 308 'syntax.name-decorator' => '#c7f', 309 'syntax.name-identifier' => '#92969d', 310 'syntax.name-entity' => '#f44', 311 'syntax.name-label' => '#aa0', 312 'syntax.name-namespace' => '#48f', 313 'syntax.operator-word' => '#c7f', 314 'syntax.text-whitespace' => '#bbb', 315 'syntax.literal-string-escape' => '#d84', 316 'syntax.literal-string-interpol' => '#b6b', 317 ); 318 } 319 320}