Skip to content

Commit

Permalink
Implement temporary Nord colors and palettes as modules
Browse files Browse the repository at this point in the history
Since the main JavaScript implementation of Nord (1) is currently not
completed and released yet, the colors and palettes will be provided
"manually" via new `nord` and `palettes` modules. As soon as the
implementation has been done they will be replaced through imports from
the official package.

References:
  (1) nordtheme/nord#36

GH-53
  • Loading branch information
arcticicestudio committed Dec 3, 2018
1 parent 24e884b commit 244c758
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 1 deletion.
26 changes: 26 additions & 0 deletions src/styles/theme/colors/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

/**
* @file Provides all available theme colors.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @since 0.2.0
*/

import nord from "./nord";
import palettes from "./palettes";

const colors = {
...nord,
...palettes
};

export { nord, palettes };
export default colors;
43 changes: 43 additions & 0 deletions src/styles/theme/colors/nord.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

/**
* @file Provides the Nord colors until the official library is available.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @since 0.2.0
*/

/**
* The Nord colors based on version `0.2.0`.
*
* @type {object}
* @see https://github.com/arcticicestudio/nord/releases/tag/v0.2.0
* @since 0.2.0
*/
const nord = {
nord0: "#2e3440",
nord1: "#3b4252",
nord2: "#434c5e",
nord3: "#4c566a",
nord4: "#d8dee9",
nord5: "#e5e9f0",
nord6: "#eceff4",
nord7: "#8fbcbb",
nord8: "#88c0d0",
nord9: "#81a1c1",
nord10: "#5e81ac",
nord11: "#bf616a",
nord12: "#d08770",
nord13: "#ebcb8b",
nord14: "#a3be8c",
nord15: "#b48ead"
};

export default nord;
53 changes: 53 additions & 0 deletions src/styles/theme/colors/palettes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

/**
* @file Provides the Nord color palettes until the official library is available.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @since 0.2.0
*/

import nord from "./nord";

/**
* The Nord color palettes based on version `0.2.0`.
*
* @type {object}
* @see https://github.com/arcticicestudio/nord/releases/tag/v0.2.0
* @since 0.2.0
*/
const palettes = {
POLAR_NIGHT: {
nord0: nord.nord0,
nord1: nord.nord1,
nord2: nord.nord2,
nord3: nord.nord3
},
SNOW_STORM: {
nord4: nord.nord4,
nord5: nord.nord5,
nord6: nord.nord6
},
FROST: {
nord7: nord.nord7,
nord8: nord.nord8,
nord9: nord.nord9,
nord10: nord.nord10
},
AURORA: {
nord11: nord.nord11,
nord12: nord.nord12,
nord13: nord.nord13,
nord14: nord.nord14,
nord15: nord.nord15
}
};

export default palettes;
6 changes: 5 additions & 1 deletion src/styles/theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@
* @since 0.2.0
*/

import colors, { nord, palettes } from "./colors";
import globals from "./globals";
import normalize from "./normalize";
import { themedMode, themedModeVariant } from "./utils";
import typography from "./typography";
import { MODE_BRIGHT_SNOW_FLURRY, MODE_DARK_NIGHT_FROST, THEME_KEY_MODE } from "./constants";

const theme = { typography };
const theme = { colors, typography };

export {
colors,
globals,
nord,
normalize,
palettes,
themedMode,
themedModeVariant,
typography,
Expand Down

0 comments on commit 244c758

Please sign in to comment.