TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Can we get a HN background color (dark mode)

48 pointsby tasoeur3 months ago
Hi there, loving the ability to change my topbar pink, but I also would love to browse my favorite website late at night without the bright flashes.<p>PS: Also happy to hear people&#x27;s favorite indie plugin to fix this! &lt;3

14 comments

roskelld3 months ago
I use my own CSS to override the default look.<p>I added thumbs up emoji for voting, book emoji for read comments, larger user names, larger headers, and dark color scheme.<p><a href="https:&#x2F;&#x2F;postimg.cc&#x2F;f3nmR6DG" rel="nofollow">https:&#x2F;&#x2F;postimg.cc&#x2F;f3nmR6DG</a><p><a href="https:&#x2F;&#x2F;pastebin.com&#x2F;zeXGi4WQ" rel="nofollow">https:&#x2F;&#x2F;pastebin.com&#x2F;zeXGi4WQ</a>
评论 #43075324 未加载
andrewfromx3 months ago
firefox dark reader works perfect.
评论 #43074797 未加载
srhtftw3 months ago
Here is a Tampermonkey¹ script I&#x27;ve used for some ime to make HN look the way I want it to (plain white background). It should be easy to adapt for a dark preference. It also adds a &quot;bookmark&quot; at the top of each page which is also easily removed if you don&#x27;t want that.<p><a href="https:&#x2F;&#x2F;pastebin.com&#x2F;fnf4CeBM" rel="nofollow">https:&#x2F;&#x2F;pastebin.com&#x2F;fnf4CeBM</a><p>¹ <a href="https:&#x2F;&#x2F;www.tampermonkey.net" rel="nofollow">https:&#x2F;&#x2F;www.tampermonkey.net</a>
AdieuToLogic3 months ago
Perhaps Greasemonkey can do the customization(s) you would like:<p><pre><code> You can add styles that override existing styles, or styles specific to new elements that your user script inserts.[0] </code></pre> HTH<p>0 - <a href="http:&#x2F;&#x2F;greasemonkey.win-start.de&#x2F;patterns&#x2F;add-css.html" rel="nofollow">http:&#x2F;&#x2F;greasemonkey.win-start.de&#x2F;patterns&#x2F;add-css.html</a>
hallman763 months ago
For desktop folks, I use the Stylebot Chrome Extension <a href="https:&#x2F;&#x2F;chromewebstore.google.com&#x2F;detail&#x2F;stylebot&#x2F;oiaejidbmkiecgbjeifoejpgmdaleoha?hl=en-US" rel="nofollow">https:&#x2F;&#x2F;chromewebstore.google.com&#x2F;detail&#x2F;stylebot&#x2F;oiaejidbmk...</a><p>I crank up the font size and set a serif font on the index page to make it easier to scan.
rbalicki3 months ago
The Chrome extension Dark Hacker News (<a href="https:&#x2F;&#x2F;chromewebstore.google.com&#x2F;detail&#x2F;dark-hacker-news&#x2F;ibhckhmgbfnlagdgpheomkaegpnimnhj" rel="nofollow">https:&#x2F;&#x2F;chromewebstore.google.com&#x2F;detail&#x2F;dark-hacker-news&#x2F;ib...</a>) works pretty well.
tapete3 months ago
Everyone on HN should be able to write a custom stylesheet, this is really not an issue.
unfixed3 months ago
I use a custom config on Dark Reader extension in all my devices. Having the same color scheme in all webpages are much better UX than what any web can implement by themselves.
3vidence3 months ago
Before anyone comments chrome extensions.<p>These don&#x27;t work on chrome mobile or safari mobile which make up a sizeable number of users.<p>Please, can we just have native dark mode?<p>I made a pretty mediocre HN client just for this feature <a href="https:&#x2F;&#x2F;github.com&#x2F;rsimmons1&#x2F;FlutterHnReader">https:&#x2F;&#x2F;github.com&#x2F;rsimmons1&#x2F;FlutterHnReader</a><p>I don&#x27;t feel like working on it anymore, let&#x27;s just have dark mode.<p>Edit: apologies spoke out of my domain on safari iOS, it supports extensions I&#x27;m an Android user.
评论 #43074997 未加载
评论 #43083560 未加载
评论 #43074643 未加载
评论 #43087850 未加载
评论 #43074648 未加载
评论 #43074646 未加载
vednig3 months ago
Built <a href="https:&#x2F;&#x2F;hacked.stream" rel="nofollow">https:&#x2F;&#x2F;hacked.stream</a> has default black BG rn
nojvek3 months ago
I would love this. Apple is notoriously bad at supporting dark mode extensions on their mobile browser.
评论 #43097142 未加载
评论 #43095126 未加载
ronjouch3 months ago
If you use Firefox, have my userContent.css DIY dark mode. Or you can massage it into the syntax expected by { Arc’s custom CSS, uBlock Origin, your CSS injecter of choice }:<p><pre><code> @-moz-document domain(news.ycombinator.com) { @media (prefers-color-scheme: dark) { body {background-color: #111 !important;} #hnmain {background-color: #181818 !important;} .c00, a:link, .subtext a:link { color: #eee !important; } .comhead { opacity: 0.5 !important; } a:visited, .subtext a:visited, .pagetop, .reply a { color: #777 !important; } button, select, input, textarea { -moz-appearance: none !important; color: #eee !important; background-color: #444 !important; border: 0.5px solid gray !important; } pre, code { color: #9d9 !important; } } } </code></pre> Obvious caveats apply: it’s mine, it’s certainly incomplete, yadayada. But hey, been working for me for years! Also, now that you know that the feature exists, you can probably search &quot;Hacker News dark mode userContent.css&quot; and find better &#x2F; more complete ones :)<p>Always a pleasure helping tasoeur.
kushie3 months ago
please
gamedever3 months ago
My attempt at providing the CSS to do this. This is where it turns into bikeshedding (T_T);<p><pre><code> :root { color-scheme: light dark; --base-color: #828282; --admin-color: #000000; --top-color: #222222; --top-sel: #ffffff; --c00: #000000; --c5a: #5a5a5a; --c72: #737373; --c82: #828282; --c88: #888888; --c9c: #9c9c9c; --cae: #aeaeae; --cbe: #bebebe; --cce: #cecece; --cdd: #dddddd; --ca2: #a30000; } center&gt;table { background-color: #f6f6ef; } table#hnmain&gt;tbody&gt;tr:nth-child(1)&gt;td { background-color: #ff6600; } font { color: #3c963c } @media (prefers-color-scheme: dark) { :root { --base-color: #909090; --admin-color: #ffffff; --top-color: #dddddd; --top-sel: #000000; --c00: #ffffff; --c5a: #a5a5a5; --c72: #8c8c8c; --c82: #7d7d7d; --c88: #777777; --c9c: #636363; --cae: #515151; --cbe: #414141; --cce: #313131; --cdd: #222222; --ca2: #a30000; } center&gt;table { background-color: #222; } table#hnmain&gt;tbody&gt;tr:nth-child(1)&gt;td { background-color: #a74300; } font { color: #639663 } } body { font-family:Verdana, Geneva, sans-serif; font-size:10pt; color: var(--base-color); } td { font-family:Verdana, Geneva, sans-serif; font-size:10pt; color: var(--base-color); } .admin td { font-family:Verdana, Geneva, sans-serif; font-size:8.5pt; color: var(--admin-color); } .subtext td { font-family:Verdana, Geneva, sans-serif; font-size: 7pt; color: var(--base-color); } input { font-family:monospace; font-size:10pt; } input[type=&#x27;submit&#x27;] { font-family:Verdana, Geneva, sans-serif; } textarea { font-family:monospace; font-size:10pt; resize:both; } a:link { color: var(--admin-color); text-decoration:none; } a:visited { color: var(--base-color); text-decoration:none; } .default { font-family:Verdana, Geneva, sans-serif; font-size: 10pt; color: var(--base-color); } .admin { font-family:Verdana, Geneva, sans-serif; font-size:8.5pt; color: var(--admin-color); } .title { font-family:Verdana, Geneva, sans-serif; font-size: 10pt; color: var(--base-color); overflow:hidden; } .subtext { font-family:Verdana, Geneva, sans-serif; font-size: 7pt; color: var(--base-color); } .yclinks { font-family:Verdana, Geneva, sans-serif; font-size: 8pt; color: var(--base-color); } .pagetop { font-family:Verdana, Geneva, sans-serif; font-size: 10pt; color: var(--top-color); line-height:12px; } .comhead { font-family:Verdana, Geneva, sans-serif; font-size: 8pt; color: var(--base-color); } .comment { font-family:Verdana, Geneva, sans-serif; font-size: 9pt; } .hnname { margin-left:1px; margin-right: 5px; } #hnmain { min-width: 796px; } .title a { word-break: break-word; } .comment a:link, .comment a:visited { text-decoration: underline; } .noshow { display: none; } .nosee { visibility: hidden; pointer-events: none; cursor: default } .c00, .c00 a:link { color: var(--admin-color); } .c5a, .c5a a:link, .c5a a:visited { color: var(--c5a); } .c73, .c73 a:link, .c73 a:visited { color: var(--c73); } .c82, .c82 a:link, .c82 a:visited { color: var(--c82); } .c88, .c88 a:link, .c88 a:visited { color: var(--c88); } .c9c, .c9c a:link, .c9c a:visited { color: var(--c9c); } .cae, .cae a:link, .cae a:visited { color: var(--cae); } .cbe, .cbe a:link, .cbe a:visited { color: var(--cbe); } .cce, .cce a:link, .cce a:visited { color: var(--cce); } .cdd, .cdd a:link, .cdd a:visited { color: var(--cdd); } .ca2 { color: var(--ca2); } .pagetop a:visited { color: var(--admin-color); } .topsel a:link, .topsel a:visited { color: var(--top-cel); } .subtext a:link, .subtext a:visited { color: var(--base-color); } .subtext a:hover { text-decoration:underline; } .comhead a:link, .subtext a:visited { color: var(--base-color); } .comhead a:hover { text-decoration:underline; } .hnmore a:link, a:visited { color: var(--base-color); } .hnmore { text-decoration:underline; } .default p { margin-top: 8px; margin-bottom: 0px; } .pagebreak {page-break-before:always} pre { overflow: auto; padding: 2px; white-space: pre-wrap; overflow-wrap:anywhere; } pre:hover { overflow:auto } .votearrow { width: 10px; height: 10px; border: 0px; margin: 3px 2px 6px; background: url(&quot;triangle.svg&quot;), linear-gradient(transparent, transparent) no-repeat; background-size: 10px; } .votelinks.nosee div.votearrow.rotate180 { display: none; } table.padtab td { padding:0px 10px } @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) { .votearrow { background-size: 10px; background-image: url(&quot;triangle.svg&quot;), linear-gradient(transparent, transparent); } } .rotate180 { -webkit-transform: rotate(180deg); &#x2F;* Chrome and other webkit browsers *&#x2F; -moz-transform: rotate(180deg); &#x2F;* FF *&#x2F; -o-transform: rotate(180deg); &#x2F;* Opera *&#x2F; -ms-transform: rotate(180deg); &#x2F;* IE9 *&#x2F; transform: rotate(180deg); &#x2F;* W3C complaint browsers *&#x2F; &#x2F;* IE8 and below *&#x2F; -ms-filter: &quot;progid:DXImageTransform.Microsoft.Matrix(M11=-1, M12=0, M21=0, M22=-1, DX=0, DY=0, SizingMethod=&#x27;auto expand&#x27;)&quot;; } &#x2F;* mobile device *&#x2F; @media only screen and (min-width : 300px) and (max-width : 750px) { #hnmain { width: 100%; min-width: 0; } body { padding: 0; margin: 0; width: 100%; } td { height: inherit !important; } .title, .comment { font-size: inherit; } span.pagetop { display: block; margin: 3px 5px; font-size: 12px; line-height: normal } span.pagetop b { display: block; font-size: 15px; } table.comment-tree .comment a { display: inline-block; max-width: 200px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align:top; } img[src=&#x27;s.gif&#x27;][width=&#x27;40&#x27;] { width: 12px; } img[src=&#x27;s.gif&#x27;][width=&#x27;80&#x27;] { width: 24px; } img[src=&#x27;s.gif&#x27;][width=&#x27;120&#x27;] { width: 36px; } img[src=&#x27;s.gif&#x27;][width=&#x27;160&#x27;] { width: 48px; } img[src=&#x27;s.gif&#x27;][width=&#x27;200&#x27;] { width: 60px; } img[src=&#x27;s.gif&#x27;][width=&#x27;240&#x27;] { width: 72px; } img[src=&#x27;s.gif&#x27;][width=&#x27;280&#x27;] { width: 84px; } img[src=&#x27;s.gif&#x27;][width=&#x27;320&#x27;] { width: 96px; } img[src=&#x27;s.gif&#x27;][width=&#x27;360&#x27;] { width: 108px; } img[src=&#x27;s.gif&#x27;][width=&#x27;400&#x27;] { width: 120px; } img[src=&#x27;s.gif&#x27;][width=&#x27;440&#x27;] { width: 132px; } img[src=&#x27;s.gif&#x27;][width=&#x27;480&#x27;] { width: 144px; } img[src=&#x27;s.gif&#x27;][width=&#x27;520&#x27;] { width: 156px; } img[src=&#x27;s.gif&#x27;][width=&#x27;560&#x27;] { width: 168px; } img[src=&#x27;s.gif&#x27;][width=&#x27;600&#x27;] { width: 180px; } img[src=&#x27;s.gif&#x27;][width=&#x27;640&#x27;] { width: 192px; } img[src=&#x27;s.gif&#x27;][width=&#x27;680&#x27;] { width: 204px; } img[src=&#x27;s.gif&#x27;][width=&#x27;720&#x27;] { width: 216px; } img[src=&#x27;s.gif&#x27;][width=&#x27;760&#x27;] { width: 228px; } img[src=&#x27;s.gif&#x27;][width=&#x27;800&#x27;] { width: 240px; } img[src=&#x27;s.gif&#x27;][width=&#x27;840&#x27;] { width: 252px; } .title { font-size: 11pt; line-height: 14pt; } .subtext { font-size: 9pt; } .votearrow { transform: scale(1.3,1.3); margin-right: 6px; } .votearrow.rotate180 { -webkit-transform: rotate(180deg) scale(1.3,1.3); &#x2F;* Chrome and other webkit browsers *&#x2F; -moz-transform: rotate(180deg) scale(1.3,1.3); &#x2F;* FF *&#x2F; -o-transform: rotate(180deg) scale(1.3,1.3); &#x2F;* Opera *&#x2F; -ms-transform: rotate(180deg) scale(1.3,1.3); &#x2F;* IE9 *&#x2F; transform: rotate(180deg) scale(1.3,1.3); &#x2F;* W3C complaint browsers *&#x2F; } .votelinks { min-width: 18px; } .votelinks a { display: block; margin-bottom: 9px; } input[type=&#x27;text&#x27;], input[type=&#x27;number&#x27;], textarea { font-size: 16px; width: 90%; } } .comment { max-width: 1215px; overflow-wrap:anywhere; } @media only screen and (min-width : 300px) and (max-width : 389px) { .comment { max-width: 270px; overflow: hidden } } @media only screen and (min-width : 390px) and (max-width : 509px) { .comment { max-width: 350px; overflow: hidden } } @media only screen and (min-width : 510px) and (max-width : 599px) { .comment { max-width: 460px; overflow: hidden } } @media only screen and (min-width : 600px) and (max-width : 689px) { .comment { max-width: 540px; overflow: hidden } } @media only screen and (min-width : 690px) and (max-width : 809px) { .comment { max-width: 620px; overflow: hidden } } @media only screen and (min-width : 810px) and (max-width : 899px) { .comment { max-width: 730px; overflow: hidden } } @media only screen and (min-width : 900px) and (max-width : 1079px) { .comment { max-width: 810px; overflow: hidden } } @media only screen and (min-width : 1080px) and (max-width : 1169px) { .comment { max-width: 970px; overflow: hidden } } @media only screen and (min-width : 1170px) and (max-width : 1259px) { .comment { max-width: 1050px; overflow: hidden } } @media only screen and (min-width : 1260px) and (max-width : 1349px) { .comment { max-width: 1130px; overflow: hidden } } </code></pre> I get, it&#x27;s long. Just taking the css that was served and editing it.
评论 #43075014 未加载