
GitHub Dark – Switch off the lights - cquanu
https://cquanu.github.io/github-dark/?ref=hackernews
======
michaelmior
I've been using a different GitHub Dark[0] for quite some time now. One of the
best things about it is that it's very well maintained as keeping up with
GitHub's own changes in markup and CSS makes things a bit of a moving target.

[0] [https://github.com/StylishThemes/GitHub-
Dark](https://github.com/StylishThemes/GitHub-Dark)

~~~
Svenskunganka
Thank you very much Michael! Never thought about this, I just wish there was
something that could change sites globally.

~~~
michaelmior
Deluminate[0] for Chrome does a pretty good job of this. For some sites I find
it does better than whatever themes happen to be available on userstyles.org.
In other cases, it performs pretty poorly but it's still far better than
having to hack together something myself for sites I care about.

[0]
[https://github.com/abstiles/deluminate](https://github.com/abstiles/deluminate)

~~~
fiatjaf
I liked this a lot, but it is way too heavy. Almost kills scrolling here, even
on super-light sites as HN.

~~~
michaelmior
Interesting. I haven't experienced any noticeable performance issues at all.
My biggest annoyance with it is that it sometimes make horizontal scrollbars
appear when they wouldn't otherwise.

~~~
fiatjaf
My computer is old.

------
sandworm101
It is strange that we are all still living an apple marketing decision. Back
in the days of green-on-black CRTs, apple decided to make their screens look
like the paper it emulated. (A more extreme part of this was the tilting CRT
screens to also mimic the aspect ration of paper). The human eye sees light.
So reading illuminated text on a dark background is generally easier. But
Apple did it first, MS followed, and white backgrounds seem here to stay.

It took some googling because I didn't know the terminology, but this is what
I am talking about: A "Pivot" screen for the Mac by Radius.

[http://lowendmac.com/wp-content/uploads/radius-pivot-
display...](http://lowendmac.com/wp-content/uploads/radius-pivot-display.jpg)

Another example of this is street signs. The oldest sign standards (speed
limits, street names) are black text on white backgrounds. But the newer ones
(highway information signs) are normally white on a dark green background,
which is much easier to read at night.

~~~
canjobear
> The human eye sees light. So reading illuminated text on a dark background
> is generally easier.

The scientific literature on readability does not back this up. Results show
large individual variability with a small overall preference for dark-on-
light.

Some old papers cited here: [https://www.joedolson.com/2006/08/on-the-
readability-of-inve...](https://www.joedolson.com/2006/08/on-the-readability-
of-inverted-color-schemes/)

EDIT: Also here is a good example of how reading white on black is hard:
[http://www.ironicsans.com/owmyeyes/](http://www.ironicsans.com/owmyeyes/)

~~~
trymas
Last link
([http://www.ironicsans.com/owmyeyes/](http://www.ironicsans.com/owmyeyes/))
probably makes the greatest point here.

After coming back to HN from that site, I've been seeing text superimposed
everywhere.

~~~
sandworm101
Well, that isn't actually "white" on black. Assuming you have an LCD screen
illuminated by leds, or florescent tubes, you are seeing some amalgamation of
colours that, together, you recognize as white. This isn't blackbody colour.

Furthermore, white-on-black isn't really the best. It's just the inverse of
what we see on most sites/devices. Try green, or red on black. It has a very
different effect as it is better tuned to the biology of the human eye, which
is why it works better in low-light conditions such as driving.

------
sytse
GitLab used to have themes that made it dark but we found that this was hard
to maintain. New features would look bad in themes that were less popular.
Right now you can only change the color and syntax highlighting theme in
GitLab: [http://i.imgur.com/6v3b0g7.png](http://i.imgur.com/6v3b0g7.png)

~~~
caseysoftware
I like this approach much better. I know _most_ Chrome plugins aren't a
problem but it still desensitizes people to the one that might be.

~~~
sytse
Glad to hear that. I agree every Chrome plugin is a potential security risk.
Like awesome screenshot [http://www.ghacks.net/2014/08/25/chromes-awesome-
screenshot-...](http://www.ghacks.net/2014/08/25/chromes-awesome-screenshot-
extension-turns-spyware-here-are-alternatives/)

------
dc2
I don't know why this is trending on HN. It's a sloppy implementation of
something that has been done better already. I cringed after installing this.

~~~
nikolay
People upvote the idea, not so much the implementation.

------
matt4077
Not sure how healthy the prevalence of dark themes is. Darkness leads to
dilated pupils which leads to a shallow depth of field which leads to
constantly adjusting focus – think SLR with a wide aperture.

Not sure about the effects, possibly none. Not sure if I want to be part of
the experiment.

~~~
PeCaN
Isn't that more of an effect of ambient darkness? Focusing on something dark
doesn't affect one's pupils, as far as I know.

Regardless, I've been using a dark GitHub theme¹ and a dark Firefox theme², as
well as a variety of other dark themes (e.g. Emacs tao-theme, dark terminal
themes, dark Thunderbird) with no ill effects (so far)—on the other hand, my
vision is not the best anyway.

\--

¹ [https://github.com/StylishThemes/GitHub-
Dark](https://github.com/StylishThemes/GitHub-Dark)

² [https://addons.mozilla.org/en-US/firefox/addon/ft-
deepdark/](https://addons.mozilla.org/en-US/firefox/addon/ft-deepdark/)

------
Rumudiez
Also known as "poor contrast simulator 2016"

When designing an inversion its important to increase contrast to maintain a
perceived equivalence in overall dynamic range with the original.

Typography is affected, as well, in that the darker color is dominant over the
brighter which results in small negative spaces seeming smaller and large ones
larger. A slight increase in tracking and a reduction in word spacing is the
typical approach for setting inverted type to maintain both legibility and
readability.

------
nikolay
How is this better than [https://userstyles.org/styles/37035/github-
dark](https://userstyles.org/styles/37035/github-dark), which also carries the
same name?

~~~
cquanu
It's a different style (CSS). Color is obviously different, different people
prefer type of different theme. That's why it's host on userstyles.org. Should
i call it GitHub Night instead?

~~~
silverwind
Yes, please find a new name if you can. It's too easily confused with our
style otherwise. (I'm a maintainer of above style)

------
hs86
Another alternative is Dark Reader[0]. It tries to offer a dark mode for all
web sites and depending on the site this works surprisingly well.

[0]
[https://github.com/alexanderby/darkreader](https://github.com/alexanderby/darkreader)

~~~
lk0nga
+1 for Dark Reader too. Tried several others available Chrome extensions but
they would decrease performance on scrolling or would lack options.

------
michaelmior
My biggest annoyance when it comes to dark themes is with Chrome. Whenever I
open a new tab even though my new tab page is black I still get a bright flash
of full white for a couple seconds before the new tab page renders.

~~~
iza
This has been an issue forever but it is finally being worked on

[https://bugs.chromium.org/p/chromium/issues/detail?id=21798](https://bugs.chromium.org/p/chromium/issues/detail?id=21798)

[https://bugs.chromium.org/p/chromium/issues/detail?id=470669](https://bugs.chromium.org/p/chromium/issues/detail?id=470669)

~~~
michaelmior
Awesome! Thanks for the pointers :)

------
BoysenberryPi
I love this. Any website where I am expected to spend any decent amount of
time needs to have a dark mode. Very surprised so few websites support this.

~~~
chipperyman573
Supporting two different CSS templates can add a lot of work, sometimes it's
simpler just to officially support one.

~~~
BoysenberryPi
I understand that and I'm definitely not expecting it from every website but
if you have a website that basically depends on me spending a lot of time
reading or doing something on that web page then you should try to not make it
a horrible experience for me.

------
gshulegaard
This was completely unusable for me. I do commit reviews using side-by-side
view and the dark theme here didn't have styles for the changed line
highlights causing them to appear in original white.

This dark theme, however, did work:
[https://userstyles.org/styles/37035/github-
dark](https://userstyles.org/styles/37035/github-dark)

------
nikolay
All sites should support a dark low-blue-light theme. Maybe this should be
some ergonomic standard. I've been using f.lux since its release, but it's
still awkward to have those bright white sites when working at night.

------
cquanu
Hi guys, I'm very committed to work hard on this dark theme. Hope you guys
like it.

If you find any bugs/problems, please tell me. I'll release a fix within 24
hours. Appreciate all positive and negative feedback.

------
destroyer954
I don't understand why github doesn't have such option in settings. It would
be a lot better than all these 3rd party options.

------
bArray
Is there a reason why this isn't an add-on to something like grease monkey?
Just simply inject a little script into the page if the URL is GitHub and
change the styles there? I don't normally personally do anything web wise but
I've heard grease money is good?

I haven't added this to my browser, but how well does it display code too?

~~~
DavideNL
The addon for Firefox is Stylish [https://addons.mozilla.org/en-
US/firefox/addon/stylish/](https://addons.mozilla.org/en-
US/firefox/addon/stylish/)

In Stylish, install this theme
[https://userstyles.org/styles/128271](https://userstyles.org/styles/128271)
or this one
[http://userstyles.org/styles/37035](http://userstyles.org/styles/37035)

------
freshyill
The contrast in this is terrible. Light gray on darker gray is not going to
make this easier for most people to read.

------
dajohnson89
It doesn't seem to work with ZenHub :-(

~~~
shark234
[http://userstyles.org/styles/37035](http://userstyles.org/styles/37035) does

------
yeowMeng
I stopped using these types of tools a while ago because I always disliked the
bright flash that was created when the page was initially loading but before
the plugin was executed. I would always try to take a long blink when I
clicked a link lol.

Has this problem been solved shy from using lynx/emacs/ect?

~~~
blacksmith_tb
I haven't tried to work around that problem, but I see at least Firefox
appears to allow you to change it from white: browser.display.background_color

~~~
zeveb
I had a nice dark background and light foreground colour going for a few
months but had to end up disabling it. Sadly, a ton of websites assume that
text is dark and background is light, and don't specify one or the other in
their CSS, so their sites look terrible unless one turns off site stylesheets
entirely (in which case their sites look _really_ terrible, but in a
completely different way).

I really, really hate what the web has become. Twenty years ago I could set my
foreground and background colours and everything Just Worked™. Now … forget
about it!

------
yoz-y
Hm, it seems that the text in the list of notifications is still black. On
dark grey background it is not very legible.

------
_RPM
Reminds me of the Eclipse dark theme.

------
TheRealGL
GitHub should give this guy a bunch of cash and make this an option in the
app.

------
fiatjaf
Why can't Stylish sync my styles to multiple computers?

~~~
PeCaN
Sign in to Firefox sync? It works for me. _shrug_

~~~
zeveb
> Sign in to Firefox sync?

Only do that if you don't mind that it is completely insecure. The password
you sign in is used to encrypt the master key for your account (which means
that if you can remember your password, Mozilla can decrypt your synced data).
Worse, the login code is JavaScript served from Mozilla's servers, so they can
at any time target one a send one's password anywhere they wish.

~~~
pritambaral
Then host your own Firefox-Auth-Server and Firefox-Sync-Server. At least
Mozilla has open-sourced those repos, and made their browsers capable of
connecting to custom servers with a simple configuration change.

But hey, you'd still be running Mozilla's code in and as your browser. As you
say, they can "decrypt your synced data" and "at any time target one a send
one's password anywhere they wish" even if you self-host the sync and auth
servers.

But at least Mozilla has a history of standing for the consumer and protecting
user rights. And Firefox is perhaps the only browser that allows hosting your
own sync and auth servers without having build your own copies of the browser.

~~~
zeveb
> Then host your own Firefox-Auth-Server and Firefox-Sync-Server.

Only a server which you physically control — if it's in the cloud, it could be
tampered with without your knowledge. And you must still use a high-entropy,
unmemorable password.

> But hey, you'd still be running Mozilla's code in and as your browser.

There's a difference between trusting code at a point in time and trusting
every single response ever. Sneaking a trojan into code which is visible to
the world is hard; sneaking a trojan into a single targeted response is easy.

> But at least Mozilla has a history of standing for the consumer and
> protecting user rights.

Sure, but that doesn't protect you against a single bad employee or against
any government which Mozilla is subject to.

> And Firefox is perhaps the only browser that allows hosting your own sync
> and auth servers without having build your own copies of the browser.

Yes, and I appreciate that. What really hurts is that Firefox _used_ to have
great sync security. I ran my own sync server for years, and was very happy
with it. But when they revised the protocol they destroyed its security.
Firefox Sync is unacceptable for password storage (as is every other sync
system of which I'm aware).

It's a distressing situation.

~~~
pritambaral
> Firefox used to have great sync security. I ran my own sync server for
> years, and was very happy with it. But when they revised the protocol they
> destroyed its security. Firefox Sync is unacceptable for password storage

Oh, I'm unknowledgeable about this. Could you expand a bit on why it is
insecure or what they did to it to make it insecure etc. Even just links would
be enough.

~~~
zeveb
> Could you expand a bit on why it is insecure

Sure thing. I'm referring to [https://blog.mozilla.org/warner/2014/05/23/the-
new-sync-prot...](https://blog.mozilla.org/warner/2014/05/23/the-new-sync-
protocol/) for details of the new protocol.

Your synced data is encrypted with a 256-bit key kB. So far, so good. The
problem is that kB is encrypted using a function of your Firefox Account
password: if someone can guess or intercept your password, then he can decrypt
kB and then decrypt any synced data.

So, how hard is it to guess or intercept your password? Well, if you can
remember your Firefox Account password, it's almost certainly guessable given
enough machines. Human-memorable passwords almost never have high enough
entropy to survive sustained attack.

But maybe you store a truly high-entropy password (e.g.
i2FH9E0G6PoCZm41C0pIJdLg1uOcGaA0GfhxKUtSQ) elsewhere, and enter it into the
Firefox Account sign-in screen. Now no-one can guess your password, and that
means that you're secure, right?

Wrong: the Firefox Account sign-in screen
([https://accounts.firefox.com/signin](https://accounts.firefox.com/signin))
is served from Mozilla's servers, which means that any time you visit it they
may choose to serve JavaScript which transmits your password to them (normally
they would perform all operations on your password locally).

'But I trust Mozilla to write Firefox!' you might argue. Sure, but it's
(theoretically) possible to verify the Firefox source and binaries once; it's
(theoretically) possible to verify that the source or binary they serve you is
the same as that they serve to the rest of the world. With code delivered
online, an attack can be targeted just once, at a single person: if you're not
logging each and every login form's source code then you're exposed. A
malicious (or compelled) Mozilla employee (or employees) could target a user;
moreover, any government Mozilla is subject to could compel it to target a
user.

Their old system performed all operations locally, always; it never downloaded
and then executed source. It was secure. Their new system is not much better
than, 'trust us.'

------
dre_bot
This shit is beautiful. Never going back to white Github.

