-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |