{"id":24908881,"url":"https://github.com/ndenicolais/darkmode","last_synced_at":"2026-04-27T18:05:49.838Z","repository":{"id":192584843,"uuid":"613469931","full_name":"ndenicolais/DarkMode","owner":"ndenicolais","description":"Android application built with Kotlin and Jetpack Compose that shows how to switch theme between light and dark mode.","archived":false,"fork":false,"pushed_at":"2023-09-04T14:01:42.000Z","size":1393,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T19:49:17.630Z","etag":null,"topics":["android","compose","dark-mode","dark-theme","jetpack-compose","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ndenicolais.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}},"created_at":"2023-03-13T16:20:06.000Z","updated_at":"2023-09-04T13:48:22.000Z","dependencies_parsed_at":"2023-09-05T03:48:59.193Z","dependency_job_id":null,"html_url":"https://github.com/ndenicolais/DarkMode","commit_stats":null,"previous_names":["ndenicolais/darkmode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ndenicolais/DarkMode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndenicolais%2FDarkMode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndenicolais%2FDarkMode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndenicolais%2FDarkMode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndenicolais%2FDarkMode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndenicolais","download_url":"https://codeload.github.com/ndenicolais/DarkMode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndenicolais%2FDarkMode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32348058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android","compose","dark-mode","dark-theme","jetpack-compose","kotlin"],"created_at":"2025-02-02T02:34:10.744Z","updated_at":"2026-04-27T18:05:49.825Z","avatar_url":"https://github.com/ndenicolais.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DarkMode\n\u003e \u003cb\u003eAuthor: Nicola De Nicolais\u003c/b\u003e\n\n## 📄 Description\nAndroid application built with Kotlin and Jetpack Compose that shows how to switch theme between light and dark mode. Compose provides the Colors class to model the Material color system and provides builder functions to create sets of light or dark colors. You can create a light set of colors using the baseline values, use lightColors while to create a dark set of colors using the baseline values, use darkColors. \n\n## 🔨  How to install and run the project\nClone this repository :\u003cbr/\u003e\n`\ngit clone https://github.com/ndenicolais/DarkMode.git\n`\n\nImport the project into Android Studio :\n\n1. File -\u003e New -\u003e Import Project\n2. Browse to \u003cpath_to_project\u003e\n3. Click \"OK\"\n\nCreate a new virtual device or connect an Android device to your computer.\u003c/br\u003e\nClick Run to start the project on the selected device.\n\n## 🛠️ Built with\nKotlin\u003c/br\u003e\nJetpack Compose\n\n## ✏️ Customization\nThe Material design system contains 4 types of colors:\n#### Primary and secondary colors\u003cbr/\u003e\n- *primary*: Color displayed most frequently across your app’s screens and components.\n- *secondary*: Color thtat provides more ways to accent and distinguish your product\n***\n#### Variants of primary and secondary colors\u003cbr/\u003e\n- *primaryVariant*: Color used to distinguish two elements of the app using the primary color, such as the top app bar and the system bar.\n- *secondaryVariant*: Color used to distinguish two elements of the app using the secondary color.\n***\n#### Additional colors\u003cbr/\u003e\nColors that refer to: background, surface, and error colors included in additional colors.\n- *background*: Color that appears behind the sliding content. It is the background color of the app UI.\n- *surface*:  Color used on surfaces of components, such as cards, sheets and menus.\n- *error*: Color used to indicate error within components, such as text fields.\n***\n####  On Colors\nColors that are applied to the elements (like text and icons) that appear on top of certain colors (like primary and secondary). There are 5 on colors:\n- *onPrimary*: Color used for text and icons displayed on top of the primary color.\n- *onSecondary*: Color used for text and icons displayed on top of the secondary color.\n- *onBackground*: Color used for text and icons displayed on top of the background color.\n- *onSurface*: Color used for text and icons displayed on top of the surface color.\n- *onError*: Color used for text and icons displayed on top of the error color.\n\n***\n- *isLight* refer to whether the Colors set is considered as a 'light' or 'dark' set of colors.\n\n## Public constructor\n\n```\nColors(\n    primary: Color,\n    primaryVariant: Color,\n    secondary: Color,\n    secondaryVariant: Color,\n    background: Color,\n    surface: Color,\n    error: Color,\n    onPrimary: Color,\n    onSecondary: Color,\n    onBackground: Color,\n    onSurface: Color,\n    onError: Color,\n    isLight: Boolean\n)\n```\n\n## 📚 Package Structure\n\n```\ncom.denicks21.recorder          # Root Package\n│ \n├── ui                          # UI resources folder\n│   ├── composables             # Composable components folder\n|   │   ├── BackPress           # Component that control and prevent back button action.\n|   │   ├── Switcher            # Component that switch theme.\n|\n├── theme                       # Theme components folder\n|   │   ├── Color               # Color palette used by the app.\n|   │   ├── Shape               # Components shapes of Compose used by the app.\n|   │   ├── Theme               # Theme used by the app.\n|   │   ├── Type                # Typography styles for the fonts used by the app.\n|\n├── MainActivity                # Main activity\n```\n\n## 📎 Screenshots\n\u003cp float=\"left\"\u003e\n\u003cimg height=\"500em\" src=\"images/screen.png\" title=\"DarkMode's screen preview\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndenicolais%2Fdarkmode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndenicolais%2Fdarkmode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndenicolais%2Fdarkmode/lists"}