Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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}`