Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanishqmanuja/capacitor-plugin-monet
Material you color scheme generation plugin for capacitor
https://github.com/tanishqmanuja/capacitor-plugin-monet
Last synced: 1 day ago
JSON representation
Material you color scheme generation plugin for capacitor
- Host: GitHub
- URL: https://github.com/tanishqmanuja/capacitor-plugin-monet
- Owner: tanishqmanuja
- Created: 2022-12-02T06:51:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-11T09:06:42.000Z (over 1 year ago)
- Last Synced: 2024-11-08T23:54:21.840Z (about 2 months ago)
- Language: Kotlin
- Homepage:
- Size: 509 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Capacitor Plugin Monet
Material You Monet Plugin for Capacitor
## Install
```bash
npm install @tanishqmanuja/capacitor-plugin-monet
npx cap sync
```## Install (Android)
Add these lines to start of root build.gradle
```
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url "https://maven.pkg.jetbrains.space/public/p/compose/dev" }
}
}
```## Usage with Ionic Color Injector
Ionic color injector can be found here: https://www.npmjs.com/package/@tanishqmanuja/ionic-color-injector
```typescript
const cs = await MonetController.autoInjectStyle();injectIonicColor('primary', {
color: { light: cs.accent1[600], dark: cs.accent1[500] },
});
injectIonicColor('secondary', {
color: { light: cs.accent2[600], dark: cs.accent2[500] },
});
injectIonicColor('tertiary', {
color: { light: cs.accent3[600], dark: cs.accent3[500] },
});
```## API
- [`getSystemMonetPalette()`](#getsystemmonetpalette)
- [`generateMonetPalette(...)`](#generatemonetpalette)
- [Type Aliases](#type-aliases)### getSystemMonetPalette()
```typescript
getSystemMonetPalette() => Promise
```Get the moent palette from native android system.
**Returns:**
Promise<MonetPalette>
---
### generateMonetPalette(...)
```typescript
generateMonetPalette(options: { seedColor: HexColor; }) => Promise
```Generates Monet palette.
| Param | Type |
| ------------- | ----------------------------------------- |
| **`options`** |{ seedColor: `#${string}`; }
|**Returns:**
Promise<MonetPalette>
---
### Type Aliases
#### MonetPalette
{ [palette in TonalPaletteNames]: MonetTonalPalette; }
#### TonalPaletteNames
'accent1' | 'accent2' | 'accent3' | 'neutral1' | 'neutral2'
#### MonetTonalPalette
{ [shade in TonalShadeNames]: HexColor; }
#### TonalShadeNames
0 | 10 | 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000
#### HexColor
`#${string}`