diff --git a/about.json b/about.json
index c2fb8bf..d30bbac 100644
--- a/about.json
+++ b/about.json
@@ -20,62 +20,86 @@
"Horizon": {
"primary": "1A1A1A",
"secondary": "ffffff",
- "tertiary": "595bca"
+ "tertiary": "595bca",
+ "tertiary-med-or-tertiary": "595bca",
+ "selected": "d7dfff"
},
"Horizon Dark": {
"primary": "ffffff",
"secondary": "1A1A1A",
- "tertiary": "595bca"
+ "tertiary": "595bca",
+ "tertiary-med-or-tertiary": "595bca",
+ "selected": "3b3e56"
},
"Royal": {
"primary": "1A1A1A",
"secondary": "ffffff",
- "tertiary": "4169e1"
+ "tertiary": "4169e1",
+ "tertiary-med-or-tertiary": "4169e1",
+ "selected": "c7e3ff"
},
"Royal Dark": {
"primary": "ffffff",
"secondary": "1A1A1A",
- "tertiary": "4169e1"
+ "tertiary": "4169e1",
+ "tertiary-med-or-tertiary": "4169e1",
+ "selected": "3a455f"
},
"Clover": {
"primary": "1A1A1A",
"secondary": "ffffff",
- "tertiary": "45a06e"
+ "tertiary": "45a06e",
+ "tertiary-med-or-tertiary": "45a06e",
+ "selected": "c6f1d5"
},
"Clover Dark": {
"primary": "ffffff",
"secondary": "1A1A1A",
- "tertiary": "45a06e"
+ "tertiary": "45a06e",
+ "tertiary-med-or-tertiary": "45a06e",
+ "selected": "47594e"
},
"Lily": {
"primary": "1A1A1A",
"secondary": "ffffff",
- "tertiary": "cc338c"
+ "tertiary": "cc338c",
+ "tertiary-med-or-tertiary": "cc338c",
+ "selected": "ffc8ee"
},
"Lily Dark": {
"primary": "ffffff",
"secondary": "1A1A1A",
- "tertiary": "cc338c"
+ "tertiary": "cc338c",
+ "tertiary-med-or-tertiary": "cc338c",
+ "selected": "5f3e4e"
},
"Violet": {
"primary": "1A1A1A",
"secondary": "ffffff",
- "tertiary": "9b15de"
+ "tertiary": "9b15de",
+ "tertiary-med-or-tertiary": "9b15de",
+ "selected": "feccff"
},
"Violet Dark": {
"primary": "ffffff",
"secondary": "1A1A1A",
- "tertiary": "9b15de"
+ "tertiary": "9b15de",
+ "tertiary-med-or-tertiary": "9b15de",
+ "selected": "4c385c"
},
"Marigold": {
"primary": "1A1A1A",
"secondary": "ffffff",
- "tertiary": "d3881f"
+ "tertiary": "d3881f",
+ "tertiary-med-or-tertiary": "d3881f",
+ "selected": "ffdcb2"
},
"Marigold Dark": {
"primary": "ffffff",
"secondary": "1A1A1A",
- "tertiary": "d3881f"
+ "tertiary": "d3881f",
+ "tertiary-med-or-tertiary": "d3881f",
+ "selected": "6c5b49"
}
}
}
\ No newline at end of file
diff --git a/common/color_definitions.scss b/common/color_definitions.scss
new file mode 100644
index 0000000..bac0b09
--- /dev/null
+++ b/common/color_definitions.scss
@@ -0,0 +1,101 @@
+html {
+ --accent-color: #{$tertiary} !important;
+ --accent-text-color: light-dark(#ffffff, #212121) !important;
+ // Background Colors
+ --background-color: light-dark(
+ oklch(from #{$tertiary} 98% calc(c * 0.25) h),
+ oklch(from #{$tertiary} 10% 0.025 h)
+ ) !important;
+ --d-content-background: light-dark(
+ oklch(from #{$secondary} calc(2 * l) c h),
+ oklch(from #{$secondary} l c h)
+ ) !important;
+ // HeaderColors
+ --header_primary-low-mid: light-dark(
+ oklch(from #{$tertiary} 73.5% calc(c * 0.5) h),
+ oklch(from #{$tertiary} l calc(c * 0.25) h)
+ ) !important;
+ --header_primary-medium: light-dark(
+ oklch(from #{$tertiary} 54% calc(c * 0.5) h),
+ oklch(from #{$tertiary} calc(l * 1.35) calc(c * 0.25) h)
+ ) !important;
+
+ // Sidebar Colors
+ --d-sidebar-border-color: light-dark(
+ oklch(from #{$tertiary} 90% c h),
+ oklch(from #{$tertiary} calc(l * 0.7) calc(c * 0.25) h)
+ ) !important;
+ --d-sidebar-link-color: light-dark(
+ oklch(from #{$tertiary} calc(l * 0.8) calc(c * 0.25) h),
+ oklch(from #{$tertiary} calc(l * 1.5) calc(c * 0.25) h)
+ ) !important;
+ --d-sidebar-suffix-color: light-dark(
+ oklch(from #{$tertiary} l calc(c * 0.9) h),
+ oklch(from #{$tertiary} l calc(c * 0.9) h)
+ ) !important;
+
+ // Other Colors
+ --d-selected: light-dark(
+ oklch(from #{$tertiary} 92% calc(c * 0.5) h),
+ oklch(from #{$tertiary} calc(l * 0.7) calc(c * 0.25) h)
+ ) !important;
+
+ --d-nav-color--active: #{$tertiary} !important;
+ --link-color: light-dark(
+ #{$tertiary},
+ oklch(from #{$tertiary} calc(l * 0.95) c h)
+ ) !important;
+ --link-color-hover: light-dark(
+ #{$tertiary},
+ oklch(from #{$tertiary} calc(l * 1.5) calc(c * 2.25) h)
+ ) !important;
+ --tertiary-hover: #{$tertiary} !important;
+
+ // Search Colors
+ --search-color: light-dark(
+ oklch(from #{$tertiary} calc(l * 0.65) calc(c * 0.65) h),
+ oklch(from #{$tertiary} calc(l * 1.5) calc(c * 2) h)
+ ) !important;
+ --search-banner-text-color: light-dark(
+ oklch(from #{$tertiary} calc(l * 0.65) calc(c * 0.65) h),
+ oklch(from #{$tertiary} calc(l * 1.85) calc(c * 2) h)
+ ) !important;
+
+ // Topic Card Colors
+ --topic-card-shadow: light-dark(
+ oklch(from #{$tertiary} calc(l * 1.85) calc(c * 0.5) h),
+ oklch(from #{$tertiary} calc(l * 0.2) calc(c * 0.01) h / 0.25)
+ ) !important;
+
+ // Button Colors
+ --button-box-shadow: light-dark(
+ oklch(from #{$tertiary} calc(l * 1.5) calc(c * 0.35) h),
+ oklch(from #{$tertiary} calc(l * 0.75) calc(c * 0.5) h)
+ ) !important;
+
+ --d-sidebar-highlight-hover-icon: var(--d-sidebar-link-color) !important;
+ --d-sidebar-highlight-hover-background: var(--d-selected) !important;
+ --d-sidebar-link-icon-color: var(--d-sidebar-link-color) !important;
+ --d-sidebar-header-color: var(--d-sidebar-link-color) !important;
+ --d-sidebar-header-icon-color: var(--d-sidebar-link-color) !important;
+ --d-sidebar-active-suffix-color: var(--d-sidebar-suffix-color) !important;
+ --d-sidebar-background: var(--background-color) !important;
+ --d-sidebar-footer-fade: var(--background-color) !important;
+ --d-sidebar-prefix-background: var(--d-selected) !important;
+ --d-sidebar-active-prefix-background: light-dark(
+ oklch(from var(--d-selected) calc(l * 0.85) c h),
+ oklch(from var(--d-selected) calc(l * 0.7) c h)
+ ) !important;
+ --d-sidebar-highlight-prefix-background: light-dark(
+ oklch(from var(--d-selected) calc(l * 0.85) c h),
+ oklch(from var(--d-selected) calc(l * 0.7) c h)
+ ) !important;
+ --d-sidebar-highlight-suffix-color: var(
+ --d-sidebar-active-suffix-color
+ ) !important;
+ --d-sidebar-highlight-color: var(--primary) !important;
+ --d-sidebar-highlight-background: var(--d-selected) !important;
+ --d-sidebar-section-link-icon-size: 1em !important;
+ --d-hover: oklch(from var(--d-selected) l c h / 0.75) !important;
+ --d-input-bg-color: var(--d-content-background) !important;
+}
diff --git a/common/common.scss b/common/common.scss
index c4ce8bc..c774676 100644
--- a/common/common.scss
+++ b/common/common.scss
@@ -2,7 +2,6 @@
@import "buttons";
@import "chat";
@import "color-choice";
-@import "color-exploration";
@import "composer";
@import "header";
@import "hiddenstuff";
diff --git a/javascripts/discourse/api-initializers/horizon.gjs b/javascripts/discourse/api-initializers/horizon.gjs
index 2af5325..36342d8 100644
--- a/javascripts/discourse/api-initializers/horizon.gjs
+++ b/javascripts/discourse/api-initializers/horizon.gjs
@@ -1,12 +1,10 @@
import { apiInitializer } from "discourse/lib/api";
-import CustomColorHtmlClass from "../components/custom-color-html-class";
-import CustomUserPalette from "../components/custom-user-palette";
import ExperimentalScreen from "../components/experimental-screen";
+import UserColorPaletteSelector from "../components/user-color-palette-selector";
export default apiInitializer("1.8.0", (api) => {
api.renderInOutlet("above-main-container", ExperimentalScreen);
- api.renderInOutlet("above-main-container", CustomColorHtmlClass);
- api.renderInOutlet("sidebar-footer-actions", CustomUserPalette);
+ api.renderInOutlet("sidebar-footer-actions", UserColorPaletteSelector);
api.registerValueTransformer("site-setting-enable-welcome-banner", () => {
return settings.enable_welcome_banner;
diff --git a/javascripts/discourse/components/custom-color-html-class.gjs b/javascripts/discourse/components/custom-color-html-class.gjs
deleted file mode 100644
index 4e1780b..0000000
--- a/javascripts/discourse/components/custom-color-html-class.gjs
+++ /dev/null
@@ -1,12 +0,0 @@
-import Component from "@glimmer/component";
-import { concat } from "@ember/helper";
-import { service } from "@ember/service";
-import htmlClass from "discourse/helpers/html-class";
-
-export default class CustomColorHtmlClass extends Component {
- @service customColor;
-
-
- {{htmlClass (concat "custom-color-" this.customColor.color)}}
-
-}
diff --git a/javascripts/discourse/components/custom-user-palette.gjs b/javascripts/discourse/components/custom-user-palette.gjs
deleted file mode 100644
index 56ec2f7..0000000
--- a/javascripts/discourse/components/custom-user-palette.gjs
+++ /dev/null
@@ -1,60 +0,0 @@
-import icon from "discourse/helpers/d-icon";
-import DMenu from "float-kit/components/d-menu";
-import SitePaletteMenuItem from "./site-palette-menu-item";
-
-const PALETTES = [
- {
- label: "Marigold",
- name: "marigold",
- color: "#d3881f",
- },
- {
- label: "Violet",
- name: "violet",
- color: "#9b15de",
- },
- {
- label: "Lily",
- name: "lily",
- color: "#CC336F",
- },
- {
- label: "Clover",
- name: "clover",
- color: "#45a06e",
- },
- {
- label: "Royal",
- name: "royal",
- color: "#4169e1",
- },
- {
- label: "Horizon",
- name: "horizon",
- color: "#595bca",
- },
-];
-
-export const DEFAULT_PALETTE_NAME = "horizon";
-
-
-
-
diff --git a/javascripts/discourse/components/site-palette-menu-item.gjs b/javascripts/discourse/components/user-color-palette-menu-item.gjs
similarity index 50%
rename from javascripts/discourse/components/site-palette-menu-item.gjs
rename to javascripts/discourse/components/user-color-palette-menu-item.gjs
index f7934c1..a2c227b 100644
--- a/javascripts/discourse/components/site-palette-menu-item.gjs
+++ b/javascripts/discourse/components/user-color-palette-menu-item.gjs
@@ -1,40 +1,43 @@
import Component from "@glimmer/component";
-import { fn } from "@ember/helper";
import { action } from "@ember/object";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import DButton from "discourse/components/d-button";
import concatClass from "discourse/helpers/concat-class";
-export default class SitePaletteMenuItem extends Component {
- @service customColor;
+export default class UserColorPaletteMenuItem extends Component {
+ @service site;
+ @service session;
get siteStyle() {
- return `--icon-color: ${this.args.colorPalette.color}`;
+ return `--icon-color: ${this.args.colorPalette.accent}`;
}
get activeClass() {
- if (this.customColor.color === this.args.colorPalette.name) {
+ if (this.args.selectedColorPaletteId === this.args.colorPalette.id) {
return "active";
}
}
@action
- handleInput(colorPalette) {
- this.customColor.setColor(colorPalette.name);
+ paletteSelected() {
+ this.args.paletteSelected(this.args.colorPalette);
}
-