Live data from Hacker News

Show HN: Invertornot.com – API to enhance your images in dark-mode

invertornot.com

21–30 of 39 posts

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#22
post #20
post #12

Earlier quoted context omitted.

Anyone who thought Retool should have a dark mode has come across this. Definitely a useful trick.

Hey This is cofounder of a retool alternative here. We did introduce dark mode in a manner where a creator can even make it dynamic for end user to choose a different theme. While I was loggerheads with my CTO cofounder on this - I am glad someone finds this useful in the community of users. I am curious what kind of use case you have for retool/ alternate tools where you see dark mode as a need

There is simply no situation in which I'd not want for something to have dark mode.

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#24
post #23

Pretty cool! A nice addition would be an in-browser runtime!

It used to be implemented in Chrome, it was part of the feature called "Force Dark Mode Web Contents" and it had a runtime tflite model that determines if the lightness should be inverted (and a simpler heuristics that just counts the number of colored pixels).

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#26
post #10

How can you use or create this model for conventional non-API projects? Like to embed it within some C code?

They're using ONNX Runtime to run the model, which has a C API: https://onnxruntime.ai/docs/get-started/with-c.html . You could also use any other ML inference library that supports the ONNX format. You'd need to look at this project's code to see how it converts input data to the expected matrix format, though.

Exactly, the transformation done for inference are located here: https://github.com/mattismegevand/invertornot/blob/main/api/...

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#27

I would be interested to see more samples. Naively it seems like you could just say "isPhoto ? REDUCE_BRIGHTNESS : INVERT"

The two big cluster are indeed photo and charts. However chart or meme are not all invertible, charts with lots of color can for example be degraded by inversion. Also some chart are already done for dark theme, for those images the model will understand that it doesn’t need to invert them.

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#29
I built dark mode for an email client’s (shortwave.com) HTML emails and this was the last major hurdle to solve. I wish that had existed then :)

Generally making emails dark mode is a non trivial problem, there is an hope source library that is a good start from Tempo: https://github.com/yourtempo/tempo-message-dark-mode

However there are plenty of edge cases that plugin doesn’t handle that we had to fix at Shortwave. Examples include legacy HTML4 attributes, better support for emails that are half dark mode, emails that have background images of #fff (looking at you google play reciepts), the list goes on. It’s honestly pretty solid now

Post reply on HN