Skip to content

Commit

Permalink
Merge pull request #17 from phun-ky/fix/themes
Browse files Browse the repository at this point in the history
Fix/themes
  • Loading branch information
phun-ky authored Dec 8, 2023
2 parents 48ef38e + 934615a commit acd8ddf
Show file tree
Hide file tree
Showing 16 changed files with 232 additions and 89 deletions.
1 change: 1 addition & 0 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [classes/MoebiusPaletteColors](modules/classes_MoebiusPaletteColors.md)
- [classes/MoebiusPalettes](modules/classes_MoebiusPalettes.md)
- [classes/MoebiusSVGHelper](modules/classes_MoebiusSVGHelper.md)
- [classes/MoebiusThemeColors](modules/classes_MoebiusThemeColors.md)
- [constants](modules/constants.md)
- [features](modules/features.md)
- [features/analogous](modules/features_analogous.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ ___

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

#### Implementation of

[MoebiusPaletteColorsInterface](../interfaces/types.MoebiusPaletteColorsInterface.md).[darkmode](../interfaces/types.MoebiusPaletteColorsInterface.md#darkmode)

#### Defined in

[classes/MoebiusPaletteColors.ts:20](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPaletteColors.ts#L20)
Expand Down
54 changes: 34 additions & 20 deletions api/classes/classes_MoebiusPalettes.MoebiusPalettes.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Creates an instance of MoebiusPalettes.

#### Defined in

[classes/MoebiusPalettes.ts:37](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L37)
[classes/MoebiusPalettes.ts:40](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L40)

## Properties

Expand All @@ -44,7 +44,7 @@ Creates an instance of MoebiusPalettes.

#### Defined in

[classes/MoebiusPalettes.ts:31](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L31)
[classes/MoebiusPalettes.ts:34](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L34)

___

Expand All @@ -58,7 +58,7 @@ ___

#### Defined in

[classes/MoebiusPalettes.ts:30](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L30)
[classes/MoebiusPalettes.ts:33](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L33)

___

Expand All @@ -72,7 +72,7 @@ ___

#### Defined in

[classes/MoebiusPalettes.ts:22](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L22)
[classes/MoebiusPalettes.ts:24](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L24)

___

Expand All @@ -86,7 +86,7 @@ ___

#### Defined in

[classes/MoebiusPalettes.ts:24](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L24)
[classes/MoebiusPalettes.ts:26](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L26)

___

Expand All @@ -100,7 +100,7 @@ ___

#### Defined in

[classes/MoebiusPalettes.ts:25](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L25)
[classes/MoebiusPalettes.ts:28](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L28)

___

Expand All @@ -114,7 +114,7 @@ ___

#### Defined in

[classes/MoebiusPalettes.ts:29](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L29)
[classes/MoebiusPalettes.ts:32](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L32)

___

Expand All @@ -128,7 +128,21 @@ ___

#### Defined in

[classes/MoebiusPalettes.ts:23](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L23)
[classes/MoebiusPalettes.ts:25](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L25)

___

### themes

**themes**: `Record`<`string`, `unknown`\> \| [`MoebiusThemeColorsInterface`](../interfaces/types.MoebiusThemeColorsInterface.md) = `{}`

#### Implementation of

[MoebiusPaletteInterface](../interfaces/types.MoebiusPaletteInterface.md).[themes](../interfaces/types.MoebiusPaletteInterface.md#themes)

#### Defined in

[classes/MoebiusPalettes.ts:27](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L27)

## Methods

Expand Down Expand Up @@ -161,7 +175,7 @@ console.log(analogousPalette); // ['#3498db', '#75db34', '#dbd134', '#db7434', '

#### Defined in

[classes/MoebiusPalettes.ts:283](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L283)
[classes/MoebiusPalettes.ts:287](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L287)

___

Expand Down Expand Up @@ -194,7 +208,7 @@ console.log(complementPalette); // ['#3498db', '#db3434', '#75db34', '#dbd134',

#### Defined in

[classes/MoebiusPalettes.ts:99](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L99)
[classes/MoebiusPalettes.ts:103](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L103)

___

Expand Down Expand Up @@ -230,7 +244,7 @@ console.log(palette);

#### Defined in

[classes/MoebiusPalettes.ts:126](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L126)
[classes/MoebiusPalettes.ts:130](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L130)

___

Expand Down Expand Up @@ -266,7 +280,7 @@ console.log(harmonizedPalette); // ['#3498db', '#75db34', '#dbd134', '#db7434',

#### Defined in

[classes/MoebiusPalettes.ts:402](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L402)
[classes/MoebiusPalettes.ts:406](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L406)

___

Expand Down Expand Up @@ -299,7 +313,7 @@ console.log(hexadicPalette); // ['#3498db', '#5d7f33', '#8473a9', '#ad7a95', '#d

#### Defined in

[classes/MoebiusPalettes.ts:257](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L257)
[classes/MoebiusPalettes.ts:261](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L261)

___

Expand Down Expand Up @@ -334,7 +348,7 @@ console.log(interpolatedPalette); // ['#3498db', '#5d6d7e', '#8473a9', '#ad7a95'

#### Defined in

[classes/MoebiusPalettes.ts:312](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L312)
[classes/MoebiusPalettes.ts:316](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L316)

___

Expand Down Expand Up @@ -369,7 +383,7 @@ console.log(luminanceShiftPalette); // ['#3498db', '#99db34', '#dbd134', '#db343

#### Defined in

[classes/MoebiusPalettes.ts:343](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L343)
[classes/MoebiusPalettes.ts:347](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L347)

___

Expand Down Expand Up @@ -412,7 +426,7 @@ console.log(monochromaticPalette);

#### Defined in

[classes/MoebiusPalettes.ts:376](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L376)
[classes/MoebiusPalettes.ts:380](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L380)

___

Expand Down Expand Up @@ -445,7 +459,7 @@ console.log(pentadicPalette); // ['#3498db', '#dbd134', '#db3434', '#34db99', '#

#### Defined in

[classes/MoebiusPalettes.ts:231](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L231)
[classes/MoebiusPalettes.ts:235](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L235)

___

Expand Down Expand Up @@ -478,7 +492,7 @@ console.log(splitPalette); // ['#3498db', '#99db34', '#dbd134', '#db3434', '#8f3

#### Defined in

[classes/MoebiusPalettes.ts:153](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L153)
[classes/MoebiusPalettes.ts:157](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L157)

___

Expand Down Expand Up @@ -511,7 +525,7 @@ console.log(tetradicPalette); // ['#3498db', '#db3434', '#34db99', '#dbd134', '#

#### Defined in

[classes/MoebiusPalettes.ts:205](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L205)
[classes/MoebiusPalettes.ts:209](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L209)

___

Expand Down Expand Up @@ -544,4 +558,4 @@ console.log(triadicPalette);

#### Defined in

[classes/MoebiusPalettes.ts:179](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L179)
[classes/MoebiusPalettes.ts:183](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusPalettes.ts#L183)
57 changes: 57 additions & 0 deletions api/classes/classes_MoebiusThemeColors.MoebiusThemeColors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[@phun-ky/moebius](../README.md) / [classes/MoebiusThemeColors](../modules/classes_MoebiusThemeColors.md) / MoebiusThemeColors

# Class: MoebiusThemeColors

[classes/MoebiusThemeColors](../modules/classes_MoebiusThemeColors.md).MoebiusThemeColors

Class representing a set of colors in various themes.

## Implements

- [`MoebiusThemeColorsInterface`](../interfaces/types.MoebiusThemeColorsInterface.md)

## Constructors

### constructor

**new MoebiusThemeColors**(`colors`): [`MoebiusThemeColors`](classes_MoebiusThemeColors.MoebiusThemeColors.md)

Creates an instance of MoebiusThemeColors.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `colors` | [`MoebiusThemeColorsInterface`](../interfaces/types.MoebiusThemeColorsInterface.md) | Palette colors to initialize with. |

#### Returns

[`MoebiusThemeColors`](classes_MoebiusThemeColors.MoebiusThemeColors.md)

**`Example`**

```ts
const colors = {
interpolate: ['#ff0000', '#00ff00'],
// other themes...
};
const theme = new MoebiusThemeColors(colors);
```

#### Defined in

[classes/MoebiusThemeColors.ts:24](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusThemeColors.ts#L24)

## Properties

### darkmode

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

#### Implementation of

[MoebiusThemeColorsInterface](../interfaces/types.MoebiusThemeColorsInterface.md).[darkmode](../interfaces/types.MoebiusThemeColorsInterface.md#darkmode)

#### Defined in

[classes/MoebiusThemeColors.ts:10](https://github.com/phun-ky/moebius/blob/main/src/classes/MoebiusThemeColors.ts#L10)
20 changes: 10 additions & 10 deletions api/interfaces/types.MoebiusPaletteAccentColorsInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Represents a palette of accent colors with different schemes.

#### Defined in

[types/index.ts:63](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L63)
[types/index.ts:70](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L70)

___

Expand All @@ -28,7 +28,7 @@ ___

#### Defined in

[types/index.ts:57](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L57)
[types/index.ts:64](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L64)

___

Expand All @@ -38,7 +38,7 @@ ___

#### Defined in

[types/index.ts:62](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L62)
[types/index.ts:69](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L69)

___

Expand All @@ -48,7 +48,7 @@ ___

#### Defined in

[types/index.ts:54](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L54)
[types/index.ts:61](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L61)

___

Expand All @@ -58,7 +58,7 @@ ___

#### Defined in

[types/index.ts:55](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L55)
[types/index.ts:62](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L62)

___

Expand All @@ -68,7 +68,7 @@ ___

#### Defined in

[types/index.ts:56](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L56)
[types/index.ts:63](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L63)

___

Expand All @@ -78,7 +78,7 @@ ___

#### Defined in

[types/index.ts:61](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L61)
[types/index.ts:68](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L68)

___

Expand All @@ -88,7 +88,7 @@ ___

#### Defined in

[types/index.ts:58](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L58)
[types/index.ts:65](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L65)

___

Expand All @@ -98,7 +98,7 @@ ___

#### Defined in

[types/index.ts:60](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L60)
[types/index.ts:67](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L67)

___

Expand All @@ -108,4 +108,4 @@ ___

#### Defined in

[types/index.ts:59](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L59)
[types/index.ts:66](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L66)
Loading

0 comments on commit acd8ddf

Please sign in to comment.