summaryrefslogtreecommitdiff
path: root/app/theme/color.ts
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-14 15:10:31 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-14 15:10:31 +0200
commite5021187e96b78b53203bd95d08d6818aea47d17 (patch)
tree37ec45d00eb963db53cd4bb4f04a770414b351cc /app/theme/color.ts
New Ignite 7.0.6 app
Diffstat (limited to 'app/theme/color.ts')
-rw-r--r--app/theme/color.ts64
1 files changed, 64 insertions, 0 deletions
diff --git a/app/theme/color.ts b/app/theme/color.ts
new file mode 100644
index 0000000..7cbb7c7
--- /dev/null
+++ b/app/theme/color.ts
@@ -0,0 +1,64 @@
+import { palette } from "./palette"
+
+/**
+ * Roles for colors. Prefer using these over the palette. It makes it easier
+ * to change things.
+ *
+ * The only roles we need to place in here are the ones that span through the app.
+ *
+ * If you have a specific use-case, like a spinner color. It makes more sense to
+ * put that in the <Spinner /> component.
+ */
+export const color = {
+ /**
+ * The palette is available to use, but prefer using the name.
+ */
+ palette,
+ /**
+ * A helper for making something see-thru. Use sparingly as many layers of transparency
+ * can cause older Android devices to slow down due to the excessive compositing required
+ * by their under-powered GPUs.
+ */
+ transparent: "rgba(0, 0, 0, 0)",
+ /**
+ * The screen background.
+ */
+ background: palette.white,
+ /**
+ * The main tinting color.
+ */
+ primary: palette.orange,
+ /**
+ * The main tinting color, but darker.
+ */
+ primaryDarker: palette.orangeDarker,
+ /**
+ * A subtle color used for borders and lines.
+ */
+ line: palette.offWhite,
+ /**
+ * The default color of text in many components.
+ */
+ text: palette.white,
+ /**
+ * Secondary information.
+ */
+ dim: palette.lightGrey,
+ /**
+ * Error messages and icons.
+ */
+ error: palette.angry,
+
+ /**
+ * Storybook background for Text stories, or any stories where
+ * the text color is color.text, which is white by default, and does not show
+ * in Stories against the default white background
+ */
+ storybookDarkBg: palette.black,
+
+ /**
+ * Storybook text color for stories that display Text components against the
+ * white background
+ */
+ storybookTextColor: palette.black,
+}