Skip to content

Commit

Permalink
fix: documentation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm committed Mar 12, 2023
1 parent 850e0bc commit 0a8da15
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

# cordova-plugin-dynamic-color

> The `DynamicColor` object provides some functions to obtain current [dynamic color](https://m3.material.io/styles/color/dynamic-color/overview) palette (Android 12+) and dark/light theme status.
> The `DynamicColor` object provides some functions to obtain current [dynamic color](https://m3.material.io/styles/color/dynamic-color/overview) colors/palette (Android 12+) and dark theme status (Android 9+).
## Installation

cordova plugin add http://github.com/ollm/cordova-plugin-dynamic-color.git
cordova plugin add cordova-plugin-dynamic-color

Methods
-------
Expand Down Expand Up @@ -271,9 +271,9 @@ DynamicColor.palette(function(palette) {
This event is fired when any change in DayNight or DynamiColor (or both at the same time) is detected, this event only checks if there have been any changes when the app goes from the background to the foreground, if the DayNight/DynamiColor is changed while the app is in the foreground it will not be detected.
```js
window.addEventListener('dynamicColor', function(changed) {
document.addEventListener('dynamicColor', function(event) {

changed = {
event.changed = {
dayNight: true, // true if the DayNight theme have changed (dark theme turned on or off)
dynamicColor: true, // true if the DynamiColor colors/palette have changed
}
Expand Down
26 changes: 25 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
{
"name": "cordova-plugin-dynamic-color",
"version": "0.0.1",
"description": "Get the Android 12+ Dynamic color and palette",
"author": "Oleguer Llopart",
"license": "MIT",
"cordova": {
"id": "cordova-plugin-dynamic-color",
"platforms": [
"android"
]
},
"description": "Get the Android 12+ Dynamic color and palette"
"repository": {
"type": "git",
"url": "https://github.com/ollm/cordova-plugin-dynamic-color"
},
"bugs": {
"url": "https://github.com/ollm/cordova-plugin-dynamic-color/issues"
},
"homepage": "https://github.com/ollm/cordova-plugin-dynamic-color#readme",
"keywords": [
"cordova",
"cordova-android",
"cordova-plugin",
"android-dark-theme",
"dynamic-color",
"dynamic-colors",
"material-you",
"material-3",
"material-design"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
}

0 comments on commit 0a8da15

Please sign in to comment.