Skip to content

Commit

Permalink
docs: ✏️ Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
phun-ky committed Dec 8, 2023
1 parent d221be2 commit 8fd35ee
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
39 changes: 39 additions & 0 deletions api/modules/features_darkmode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[@phun-ky/moebius](../README.md) / features/darkmode

# Module: features/darkmode

## Functions

### darkmode

**darkmode**(`baseColor`, `secondaryColor`, `options?`): `Record`<`string`, \`#${string}\`[]\>

Generates a dark mode color palette based on the provided base and secondary colors.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `baseColor` | [`MoebiusChromaColorInputType`](types.md#moebiuschromacolorinputtype) | The base color for the palette. |
| `secondaryColor` | [`MoebiusChromaColorInputType`](types.md#moebiuschromacolorinputtype) | The secondary color for the palette. |
| `options?` | `Record`<`string`, `unknown`\> \| [`MoebiusPaletteOptionsType`](types.md#moebiuspaletteoptionstype) | Palette options. |

#### Returns

`Record`<`string`, \`#${string}\`[]\>

- The generated dark mode color palette.

**`Example`**

```ts
const baseColor = '#3498db';
const secondaryColor = '#2ecc71';
const options = { bezier: true, colorScaleMode: 'lch' };
const palette = darkmode(baseColor, secondaryColor, options);
console.log(palette);
```

#### Defined in

[features/darkmode.ts:30](https://github.com/phun-ky/moebius/blob/main/src/features/darkmode.ts#L30)
37 changes: 37 additions & 0 deletions api/modules/utils_get_chroma_bezier_scale_colors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[@phun-ky/moebius](../README.md) / utils/get-chroma-bezier-scale-colors

# Module: utils/get-chroma-bezier-scale-colors

## Functions

### getChromaBezierScaleColors

**getChromaBezierScaleColors**(`colors`, `options?`): `any`

Generates a color scale using Chroma.js's bezier interpolation.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `colors` | \`#${string}\`[] | The input colors for the bezier interpolation. |
| `options?` | `Record`<`string`, `unknown`\> \| [`MoebiusPaletteOptionsType`](types.md#moebiuspaletteoptionstype) | Options for generating the color scale. |

#### Returns

`any`

- The generated color scale.

**`Example`**

```ts
const inputColors = ['#3498db', '#2ecc71', '#e74c3c'];
const options = { numberOfColors: 5, colorScaleMode: 'lch', correctLightness: false };
const scaleColors = getChromaBezierScaleColors(inputColors, options);
console.log(scaleColors);
```

#### Defined in

[utils/get-chroma-bezier-scale-colors.ts:20](https://github.com/phun-ky/moebius/blob/main/src/utils/get-chroma-bezier-scale-colors.ts#L20)
37 changes: 37 additions & 0 deletions api/modules/utils_get_chroma_scale_colors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[@phun-ky/moebius](../README.md) / utils/get-chroma-scale-colors

# Module: utils/get-chroma-scale-colors

## Functions

### getChromaScaleColors

**getChromaScaleColors**(`colors`, `options?`): `any`

Generates a color scale using Chroma.js.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `colors` | \`#${string}\`[] | The input colors for the color scale. |
| `options?` | `Record`<`string`, `unknown`\> \| [`MoebiusPaletteOptionsType`](types.md#moebiuspaletteoptionstype) | Options for generating the color scale. |

#### Returns

`any`

- The generated color scale.

**`Example`**

```ts
const inputColors = ['#3498db', '#2ecc71', '#e74c3c'];
const options = { numberOfColors: 5, colorScaleMode: 'lch', correctLightness: false };
const scaleColors = getChromaScaleColors(inputColors, options);
console.log(scaleColors);
```

#### Defined in

[utils/get-chroma-scale-colors.ts:20](https://github.com/phun-ky/moebius/blob/main/src/utils/get-chroma-scale-colors.ts#L20)

0 comments on commit 8fd35ee

Please sign in to comment.