From e37842f0e4a7fc63bd43bfb71fea1dc7aa916692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Vassbotn=20R=C3=B8yne-Helgesen?= Date: Fri, 8 Dec 2023 15:32:58 +0100 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Use=20a=20separate=20?= =?UTF-8?q?`themes`=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/MoebiusPalettes.ts | 20 ++++++++++++-------- src/classes/MoebiusThemeColors.ts | 29 +++++++++++++++++++++++++++++ src/types/index.ts | 7 +++++++ 3 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 src/classes/MoebiusThemeColors.ts diff --git a/src/classes/MoebiusPalettes.ts b/src/classes/MoebiusPalettes.ts index 2549a76..53196c3 100644 --- a/src/classes/MoebiusPalettes.ts +++ b/src/classes/MoebiusPalettes.ts @@ -7,12 +7,14 @@ import { MoebiusPaletteDefaultOptionsType, MoebiusPaletteOptionsType, MoebiusPaletteInterface, - MoebiusChromaColorInputType + MoebiusChromaColorInputType, + MoebiusThemeColorsInterface } from '../types'; import { MoebiusPaletteColors } from './MoebiusPaletteColors'; import { MoebiusAccentColors } from './MoebiusAccentColors'; import * as FEATURES from '../features'; +import { MoebiusThemeColors } from './MoebiusThemeColors'; /** * MoebiusPalettes class representing a set of color palettes and their variations. @@ -22,6 +24,7 @@ export class MoebiusPalettes implements MoebiusPaletteInterface { baseColor: MoebiusColorInterface; secondaryColor: MoebiusColorInterface; colors: Record | MoebiusPaletteColorsInterface = {}; + themes: Record | MoebiusThemeColorsInterface = {}; defaultOptions: MoebiusPaletteDefaultOptionsType = { ...MOEBIUS_PALETTE_DEFAULT_OPTIONS, divergentColor: '#f5f5f5' @@ -38,7 +41,13 @@ export class MoebiusPalettes implements MoebiusPaletteInterface { this.options = { ...this.defaultOptions, ...options }; this.baseColor = this.options.baseColor; this.secondaryColor = this.options.secondaryColor; - + this.themes = new MoebiusThemeColors({ + darkmode: this.darkmode( + this.baseColor.hex, + this.secondaryColor.hex, + this.options + ) + }); this.colors = new MoebiusPaletteColors({ interpolate: this.interpolate( this.baseColor.hex, @@ -57,12 +66,7 @@ export class MoebiusPalettes implements MoebiusPaletteInterface { tetradic: this.tetradic(this.baseColor.hex), pentadic: this.pentadic(this.baseColor.hex), hexadic: this.hexadic(this.baseColor.hex), - analogous: this.analogous(this.baseColor.hex), - darkmode: this.darkmode( - this.baseColor.hex, - this.secondaryColor.hex, - this.options - ) + analogous: this.analogous(this.baseColor.hex) }); this.accents = new MoebiusAccentColors(this.colors, this.options); diff --git a/src/classes/MoebiusThemeColors.ts b/src/classes/MoebiusThemeColors.ts new file mode 100644 index 0000000..4c12485 --- /dev/null +++ b/src/classes/MoebiusThemeColors.ts @@ -0,0 +1,29 @@ +import { + MoebiusColorValueHexType, + MoebiusThemeColorsInterface +} from '../types'; + +/** + * Class representing a set of colors in various themes. + */ +export class MoebiusThemeColors implements MoebiusThemeColorsInterface { + darkmode: Record; + + /** + * Creates an instance of MoebiusThemeColors. + * @param {MoebiusThemeColorsInterface} colors - Palette colors to initialize with. + * @example + * ```ts + * const colors = { + * interpolate: ['#ff0000', '#00ff00'], + * // other themes... + * }; + * const theme = new MoebiusThemeColors(colors); + * ``` + */ + constructor(colors: MoebiusThemeColorsInterface) { + Object.keys(colors).forEach((theme) => { + this[theme] = colors[theme]; + }); + } +} diff --git a/src/types/index.ts b/src/types/index.ts index e6a5e4a..5d9dbca 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -24,6 +24,7 @@ export interface MoebiusPaletteInterface { baseColor: MoebiusColorInterface; secondaryColor: MoebiusColorInterface; colors: Record | MoebiusPaletteColorsInterface; + themes: Record | MoebiusThemeColorsInterface; defaultOptions: MoebiusPaletteDefaultOptionsType; options: MoebiusPaletteOptionsType; all: MoebiusColorValueHexType[]; @@ -44,6 +45,12 @@ export interface MoebiusPaletteColorsInterface { pentadic: MoebiusColorValueHexType[]; hexadic: MoebiusColorValueHexType[]; analogous: MoebiusColorValueHexType[]; +} + +/** + * Represents a palette of colors with different themes. + */ +export interface MoebiusThemeColorsInterface { darkmode: Record; } From 934615a8723506f1e747480d73422443c5f97a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Vassbotn=20R=C3=B8yne-Helgesen?= Date: Fri, 8 Dec 2023 15:33:14 +0100 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20Generate=20doc?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/README.md | 1 + ...ebiusPaletteColors.MoebiusPaletteColors.md | 4 -- ...classes_MoebiusPalettes.MoebiusPalettes.md | 54 +++++++++++------- ...s_MoebiusThemeColors.MoebiusThemeColors.md | 57 +++++++++++++++++++ ...pes.MoebiusPaletteAccentColorsInterface.md | 20 +++---- .../types.MoebiusPaletteColorsInterface.md | 30 ++++------ .../types.MoebiusPaletteInterface.md | 18 ++++-- .../types.MoebiusThemeColorsInterface.md | 21 +++++++ .../types.NearestColorColorMatchInterface.md | 6 +- .../types.NearestColorColorSpecInterface.md | 6 +- api/modules/classes_MoebiusThemeColors.md | 7 +++ api/modules/main.md | 6 ++ api/modules/types.md | 35 ++++++------ 13 files changed, 184 insertions(+), 81 deletions(-) create mode 100644 api/classes/classes_MoebiusThemeColors.MoebiusThemeColors.md create mode 100644 api/interfaces/types.MoebiusThemeColorsInterface.md create mode 100644 api/modules/classes_MoebiusThemeColors.md diff --git a/api/README.md b/api/README.md index e1c9b4e..2a20f3a 100644 --- a/api/README.md +++ b/api/README.md @@ -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) diff --git a/api/classes/classes_MoebiusPaletteColors.MoebiusPaletteColors.md b/api/classes/classes_MoebiusPaletteColors.MoebiusPaletteColors.md index ec05602..341565e 100644 --- a/api/classes/classes_MoebiusPaletteColors.MoebiusPaletteColors.md +++ b/api/classes/classes_MoebiusPaletteColors.MoebiusPaletteColors.md @@ -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) diff --git a/api/classes/classes_MoebiusPalettes.MoebiusPalettes.md b/api/classes/classes_MoebiusPalettes.MoebiusPalettes.md index d1a0313..86c3844 100644 --- a/api/classes/classes_MoebiusPalettes.MoebiusPalettes.md +++ b/api/classes/classes_MoebiusPalettes.MoebiusPalettes.md @@ -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 @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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 @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) diff --git a/api/classes/classes_MoebiusThemeColors.MoebiusThemeColors.md b/api/classes/classes_MoebiusThemeColors.MoebiusThemeColors.md new file mode 100644 index 0000000..f98d8ae --- /dev/null +++ b/api/classes/classes_MoebiusThemeColors.MoebiusThemeColors.md @@ -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) diff --git a/api/interfaces/types.MoebiusPaletteAccentColorsInterface.md b/api/interfaces/types.MoebiusPaletteAccentColorsInterface.md index ec9c199..94379a5 100644 --- a/api/interfaces/types.MoebiusPaletteAccentColorsInterface.md +++ b/api/interfaces/types.MoebiusPaletteAccentColorsInterface.md @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) ___ @@ -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) diff --git a/api/interfaces/types.MoebiusPaletteColorsInterface.md b/api/interfaces/types.MoebiusPaletteColorsInterface.md index dbbf065..b731277 100644 --- a/api/interfaces/types.MoebiusPaletteColorsInterface.md +++ b/api/interfaces/types.MoebiusPaletteColorsInterface.md @@ -18,7 +18,7 @@ Represents a palette of colors with different schemes. #### Defined in -[types/index.ts:46](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L46) +[types/index.ts:47](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L47) ___ @@ -28,17 +28,7 @@ ___ #### Defined in -[types/index.ts:40](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L40) - -___ - -### darkmode - -• **darkmode**: `Record`<`string`, \`#${string}\`[]\> - -#### Defined in - -[types/index.ts:47](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L47) +[types/index.ts:41](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L41) ___ @@ -48,7 +38,7 @@ ___ #### Defined in -[types/index.ts:45](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L45) +[types/index.ts:46](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L46) ___ @@ -58,7 +48,7 @@ ___ #### Defined in -[types/index.ts:37](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L37) +[types/index.ts:38](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L38) ___ @@ -68,7 +58,7 @@ ___ #### Defined in -[types/index.ts:38](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L38) +[types/index.ts:39](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L39) ___ @@ -78,7 +68,7 @@ ___ #### Defined in -[types/index.ts:39](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L39) +[types/index.ts:40](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L40) ___ @@ -88,7 +78,7 @@ ___ #### Defined in -[types/index.ts:44](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L44) +[types/index.ts:45](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L45) ___ @@ -98,7 +88,7 @@ ___ #### Defined in -[types/index.ts:41](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L41) +[types/index.ts:42](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L42) ___ @@ -108,7 +98,7 @@ ___ #### Defined in -[types/index.ts:43](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L43) +[types/index.ts:44](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L44) ___ @@ -118,4 +108,4 @@ ___ #### Defined in -[types/index.ts:42](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L42) +[types/index.ts:43](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L43) diff --git a/api/interfaces/types.MoebiusPaletteInterface.md b/api/interfaces/types.MoebiusPaletteInterface.md index 4a6664f..9ff6995 100644 --- a/api/interfaces/types.MoebiusPaletteInterface.md +++ b/api/interfaces/types.MoebiusPaletteInterface.md @@ -16,7 +16,7 @@ #### Defined in -[types/index.ts:30](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L30) +[types/index.ts:31](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L31) ___ @@ -26,7 +26,7 @@ ___ #### Defined in -[types/index.ts:29](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L29) +[types/index.ts:30](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L30) ___ @@ -56,7 +56,7 @@ ___ #### Defined in -[types/index.ts:27](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L27) +[types/index.ts:28](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L28) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[types/index.ts:28](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L28) +[types/index.ts:29](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L29) ___ @@ -77,3 +77,13 @@ ___ #### Defined in [types/index.ts:25](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L25) + +___ + +### themes + +• **themes**: `Record`<`string`, `unknown`\> \| [`MoebiusThemeColorsInterface`](types.MoebiusThemeColorsInterface.md) + +#### Defined in + +[types/index.ts:27](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L27) diff --git a/api/interfaces/types.MoebiusThemeColorsInterface.md b/api/interfaces/types.MoebiusThemeColorsInterface.md new file mode 100644 index 0000000..c852798 --- /dev/null +++ b/api/interfaces/types.MoebiusThemeColorsInterface.md @@ -0,0 +1,21 @@ +[@phun-ky/moebius](../README.md) / [types](../modules/types.md) / MoebiusThemeColorsInterface + +# Interface: MoebiusThemeColorsInterface + +[types](../modules/types.md).MoebiusThemeColorsInterface + +Represents a palette of colors with different themes. + +## Implemented by + +- [`MoebiusThemeColors`](../classes/classes_MoebiusThemeColors.MoebiusThemeColors.md) + +## Properties + +### darkmode + +• **darkmode**: `Record`<`string`, \`#${string}\`[]\> + +#### Defined in + +[types/index.ts:54](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L54) diff --git a/api/interfaces/types.NearestColorColorMatchInterface.md b/api/interfaces/types.NearestColorColorMatchInterface.md index 7040018..fbd1029 100644 --- a/api/interfaces/types.NearestColorColorMatchInterface.md +++ b/api/interfaces/types.NearestColorColorMatchInterface.md @@ -14,7 +14,7 @@ Represents a color match for nearest color matching. #### Defined in -[types/index.ts:189](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L189) +[types/index.ts:196](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L196) ___ @@ -24,7 +24,7 @@ ___ #### Defined in -[types/index.ts:191](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L191) +[types/index.ts:198](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L198) ___ @@ -34,4 +34,4 @@ ___ #### Defined in -[types/index.ts:190](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L190) +[types/index.ts:197](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L197) diff --git a/api/interfaces/types.NearestColorColorSpecInterface.md b/api/interfaces/types.NearestColorColorSpecInterface.md index 16547af..92b2c09 100644 --- a/api/interfaces/types.NearestColorColorSpecInterface.md +++ b/api/interfaces/types.NearestColorColorSpecInterface.md @@ -14,7 +14,7 @@ Represents a color specification for nearest color matching. #### Defined in -[types/index.ts:180](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L180) +[types/index.ts:187](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L187) ___ @@ -24,7 +24,7 @@ ___ #### Defined in -[types/index.ts:182](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L182) +[types/index.ts:189](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L189) ___ @@ -34,4 +34,4 @@ ___ #### Defined in -[types/index.ts:181](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L181) +[types/index.ts:188](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L188) diff --git a/api/modules/classes_MoebiusThemeColors.md b/api/modules/classes_MoebiusThemeColors.md new file mode 100644 index 0000000..c2a2f38 --- /dev/null +++ b/api/modules/classes_MoebiusThemeColors.md @@ -0,0 +1,7 @@ +[@phun-ky/moebius](../README.md) / classes/MoebiusThemeColors + +# Module: classes/MoebiusThemeColors + +## Classes + +- [MoebiusThemeColors](../classes/classes_MoebiusThemeColors.MoebiusThemeColors.md) diff --git a/api/modules/main.md b/api/modules/main.md index 6d68df2..b1a0b15 100644 --- a/api/modules/main.md +++ b/api/modules/main.md @@ -124,6 +124,12 @@ Re-exports [MoebiusRGBObjectType](types.md#moebiusrgbobjecttype) ___ +### MoebiusThemeColorsInterface + +Re-exports [MoebiusThemeColorsInterface](../interfaces/types.MoebiusThemeColorsInterface.md) + +___ + ### MoebiusXYZObjectType Re-exports [MoebiusXYZObjectType](types.md#moebiusxyzobjecttype) diff --git a/api/modules/types.md b/api/modules/types.md index fdf62a9..f9bacff 100644 --- a/api/modules/types.md +++ b/api/modules/types.md @@ -8,6 +8,7 @@ - [MoebiusPaletteAccentColorsInterface](../interfaces/types.MoebiusPaletteAccentColorsInterface.md) - [MoebiusPaletteColorsInterface](../interfaces/types.MoebiusPaletteColorsInterface.md) - [MoebiusPaletteInterface](../interfaces/types.MoebiusPaletteInterface.md) +- [MoebiusThemeColorsInterface](../interfaces/types.MoebiusThemeColorsInterface.md) - [NearestColorColorMatchInterface](../interfaces/types.NearestColorColorMatchInterface.md) - [NearestColorColorSpecInterface](../interfaces/types.NearestColorColorSpecInterface.md) @@ -30,7 +31,7 @@ Represents a CMYK color object. #### Defined in -[types/index.ts:169](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L169) +[types/index.ts:176](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L176) ___ @@ -40,7 +41,7 @@ ___ #### Defined in -[types/index.ts:194](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L194) +[types/index.ts:201](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L201) ___ @@ -52,7 +53,7 @@ Represents a color value in hexadecimal format. #### Defined in -[types/index.ts:102](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L102) +[types/index.ts:109](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L109) ___ @@ -64,7 +65,7 @@ Represents a color value in HSL format. #### Defined in -[types/index.ts:107](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L107) +[types/index.ts:114](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L114) ___ @@ -76,7 +77,7 @@ Represents a color value in HSLA format. #### Defined in -[types/index.ts:112](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L112) +[types/index.ts:119](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L119) ___ @@ -88,7 +89,7 @@ Represents a color value in RGB format. #### Defined in -[types/index.ts:118](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L118) +[types/index.ts:125](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L125) ___ @@ -100,7 +101,7 @@ Represents a color value in RGBA format. #### Defined in -[types/index.ts:123](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L123) +[types/index.ts:130](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L130) ___ @@ -120,7 +121,7 @@ Represents an HSI color object. #### Defined in -[types/index.ts:149](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L149) +[types/index.ts:156](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L156) ___ @@ -140,7 +141,7 @@ Represents an HSL color object. #### Defined in -[types/index.ts:134](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L134) +[types/index.ts:141](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L141) ___ @@ -160,7 +161,7 @@ Represents an HSV color object. #### Defined in -[types/index.ts:139](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L139) +[types/index.ts:146](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L146) ___ @@ -180,7 +181,7 @@ Represents an HWB color object. #### Defined in -[types/index.ts:159](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L159) +[types/index.ts:166](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L166) ___ @@ -200,7 +201,7 @@ Represents a LAB color object. #### Defined in -[types/index.ts:164](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L164) +[types/index.ts:171](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L171) ___ @@ -220,7 +221,7 @@ Represents an LCH color object. #### Defined in -[types/index.ts:144](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L144) +[types/index.ts:151](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L151) ___ @@ -246,7 +247,7 @@ Represents default options for generating a color palette. #### Defined in -[types/index.ts:87](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L87) +[types/index.ts:94](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L94) ___ @@ -275,7 +276,7 @@ Represents options for generating a color palette. #### Defined in -[types/index.ts:69](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L69) +[types/index.ts:76](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L76) ___ @@ -295,7 +296,7 @@ Represents an RGB color object. #### Defined in -[types/index.ts:129](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L129) +[types/index.ts:136](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L136) ___ @@ -315,4 +316,4 @@ Represents an XYZ color object. #### Defined in -[types/index.ts:154](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L154) +[types/index.ts:161](https://github.com/phun-ky/moebius/blob/main/src/types/index.ts#L161)