How to take Full page Website Screenshot in Dark Mode

0 Comments
Editor Ratings:
User Ratings:
[Total: 1    Average: 1/5]




This tutorial explains how to take full page website screenshot in dark mode. Here I will talk about a command line tool which helps you take website screenshot in dark mode. The only condition is that the target website should support dark mode. Here you just have to run a simple command and it will save two different screenshots on your PC. It captures the web page screenshot in light mode and one in dark mode and saves it on your PC. The screenshot is full page and then you can use that whenever you want. This is a simple script and you can use it from terminal of the latest MAC and Windows 10 OS.

dark-mode-screenshot is basically a puppeteer script that uses Chromium automation to take full page website screenshot. And it automatically enables the dark mode on the website if it supports. Nowadays a lot of websites are supporting dark mode and you can use anyone of those websites in the simple script I have mentioned here. If you want then you can even use this in some of your projects as it is open source. Also, if you don’t want to take screenshot of the full page then you can specify that in a command line switch.

How to take Full page Website Screenshot in Dark Mode

How to take Full page Website Screenshot in Dark Mode?

Here this script requires Node.js to be setup on your PC with working npm command. After that, you can just setup all of its dependencies and then start using it. Just clone the repository from here and then extract it and then open a command prompt in the same folder. Now, start with setting up the dependencies. For that, you just run the following command and wait for it to finish. Here it will setup puppeteer and Chromium.

npm install

npm install dependencies dark mode screenshot

Now, when all the dependencies are configured, you can start using this tool. So, just run the command below and wait for it to take screenshots and save them in the current directory for you. It will open up the Chromium browser, load the specified websites and take the screenshot. Simple as that.

node dark-mode-screenshot.js --url WebsiteURL --output screenshot --fullPage

dark-mode-screenshot script in action

That’s all about this simple puppeteer script to take web page screenshots in dark mode. But do note that, before executing this script, you will have to make sure that dark mode is also enabled in your operating system. In macOS, you can turn it on from the settings and in Windows 10, use Colors section in Personalization settings to enable dark mode.

Final thoughts

If you are interested in taking website screenshots from command line then I’d recommend you to use this script next time. With this, you can quickly take normal full page screenshots. And if the target website supports dark mode then you can take its screenshots as well easily. So, if you are looking for a tool or application to take website screenshots then give this script a try.

Editor Ratings:
User Ratings:
[Total: 1    Average: 1/5]
Free/Paid: Free