{"id":15376476,"url":"https://github.com/tomayac/dark-mode-screenshot","last_synced_at":"2025-04-15T16:34:46.833Z","repository":{"id":49768251,"uuid":"202694640","full_name":"tomayac/dark-mode-screenshot","owner":"tomayac","description":"This Puppeteer script takes a  📷 screenshot of a webpage in 🌞 Light and 🌒 Dark Mode.","archived":false,"fork":false,"pushed_at":"2023-02-27T08:18:40.000Z","size":1458,"stargazers_count":60,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T22:23:29.628Z","etag":null,"topics":["dark-mode","dark-theme","puppeteer","screenshot"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/dark-mode-screenshot","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomayac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-16T08:59:15.000Z","updated_at":"2025-01-31T16:21:57.000Z","dependencies_parsed_at":"2024-10-16T15:20:58.718Z","dependency_job_id":"f1fbdbeb-60de-4ec1-9fee-43883d09992b","html_url":"https://github.com/tomayac/dark-mode-screenshot","commit_stats":{"total_commits":26,"total_committers":4,"mean_commits":6.5,"dds":"0.23076923076923073","last_synced_commit":"352a3c998bf08f482559c36ac2f474d8231cf520"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomayac%2Fdark-mode-screenshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomayac%2Fdark-mode-screenshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomayac%2Fdark-mode-screenshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomayac%2Fdark-mode-screenshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomayac","download_url":"https://codeload.github.com/tomayac/dark-mode-screenshot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248916743,"owners_count":21182861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dark-mode","dark-theme","puppeteer","screenshot"],"created_at":"2024-10-01T14:07:45.556Z","updated_at":"2025-04-15T16:34:46.816Z","avatar_url":"https://github.com/tomayac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dark Mode Screenshot 📷🌒\n\nThis [Puppeteer](https://github.com/GoogleChrome/puppeteer/) script\ntakes a screenshot of a webpage in Light and Dark Mode.\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003cth\u003eDark Mode\u003c/th\u003e\n    \u003cth\u003eLight Mode\u003c/th\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://github.com/tomayac/dark-mode-screenshot/blob/cabecd90eee5299e10089311cba61f70694f00d3/screenshot-dark.png?raw=true\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg src=\"https://github.com/tomayac/dark-mode-screenshot/blob/cabecd90eee5299e10089311cba61f70694f00d3/screenshot-light.png?raw=true\"\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003ccode\u003escreenshot-dark.png\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003escreenshot-light.png\u003c/code\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## 👩‍💻 Usage\n\nLocally from the command line:\n\n```bash\n$ node dark-mode-screenshot.js --url https://googlechromelabs.github.io/dark-mode-toggle/demo/ --output screenshot --fullPage --pause 750\n```\n\nWithout installing remotely from npm:\n\n```bash\n$ npx dark-mode-screenshot --url https://googlechromelabs.github.io/dark-mode-toggle/demo/ --output screenshot --fullPage --pause 750\n```\n\n| Parameter (long) | Parameter (short) | Description |\n| --- | --- | --- |\n| `--url` | `-u` | The URL of the webpage, defaults to `https://googlechromelabs.github.io/dark-mode-toggle/ demo/index.html`. |\n| `--output` | `-o` | The file prefix of the screenshot (there will be a light and a dark file), defaults to `screenshot`. |\n| `--fullPage` | `-f` | Whether or not to take a full page screenshot, defaults to `true`. |\n| `--pause` | `-p` | Time in milliseconds to pause before taking each screenshot, defaults to `0`. |\n\n\n## Acknowledgements\n\nThanks to [@mathiasbynens](https://github.com/mathiasbynens) for implementing\n[`page.emulateMediaFeatures(features)`](https://github.com/GoogleChrome/puppeteer/blob/v2.0.0/docs/api.md#pageemulatemediatypetype)\nin Puppeteer and for making this script a lot lighter.\n\n## 📄 License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomayac%2Fdark-mode-screenshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomayac%2Fdark-mode-screenshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomayac%2Fdark-mode-screenshot/lists"}