diff --git a/CHANGES.md b/CHANGES.md
index bd00a1fcf..ef25749a0 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -41,6 +41,7 @@
- Add the ability to disable standard, password login [Taiga #2999](https://tree.taiga.io/project/penpot/us/2999)
- Don't stop SVG import when an image cannot be imported [#1531](https://github.com/penpot/penpot/issues/1531)
- Fix paste shapes while editing text [Taiga #2396](https://tree.taiga.io/project/penpot/issue/2396)
+- Show Penpot color in Safari tab bar [#1803](https://github.com/penpot/penpot/issues/1803)
### :bug: Bugs fixed
diff --git a/common/src/app/common/colors.cljc b/common/src/app/common/colors.cljc
index 7d5cb5e51..95dbd63b6 100644
--- a/common/src/app/common/colors.cljc
+++ b/common/src/app/common/colors.cljc
@@ -14,6 +14,7 @@
(def gray-20 "#B1B2B5")
(def gray-30 "#7B7D85")
(def gray-40 "#64666A")
+(def gray-50 "#303236")
(def info "#59B9E2")
(def test "#fabada")
(def white "#FFFFFF")
diff --git a/frontend/resources/templates/index.mustache b/frontend/resources/templates/index.mustache
index bf6ab809d..ba8c3c054 100644
--- a/frontend/resources/templates/index.mustache
+++ b/frontend/resources/templates/index.mustache
@@ -15,6 +15,7 @@
+
diff --git a/frontend/src/app/main/ui/dashboard.cljs b/frontend/src/app/main/ui/dashboard.cljs
index bcf746f50..93ad15877 100644
--- a/frontend/src/app/main/ui/dashboard.cljs
+++ b/frontend/src/app/main/ui/dashboard.cljs
@@ -6,6 +6,7 @@
(ns app.main.ui.dashboard
(:require
+ [app.common.colors :as clr]
[app.common.spec :as us]
[app.main.data.dashboard :as dd]
[app.main.data.dashboard.shortcuts :as sc]
@@ -22,6 +23,7 @@
[app.main.ui.dashboard.sidebar :refer [sidebar]]
[app.main.ui.dashboard.team :refer [team-settings-page team-members-page team-invitations-page]]
[app.main.ui.hooks :as hooks]
+ [app.util.dom :as dom]
[app.util.keyboard :as kbd]
[goog.events :as events]
[rumext.alpha :as mf])
@@ -103,6 +105,7 @@
(mf/use-effect
(fn []
+ (dom/set-html-theme-color clr/white "light")
(let [events [(events/listen goog/global EventType.KEYDOWN
(fn [event]
(when (kbd/enter? event)
diff --git a/frontend/src/app/main/ui/viewer.cljs b/frontend/src/app/main/ui/viewer.cljs
index 3bb8ad2c9..7ba3dcce0 100644
--- a/frontend/src/app/main/ui/viewer.cljs
+++ b/frontend/src/app/main/ui/viewer.cljs
@@ -6,6 +6,7 @@
(ns app.main.ui.viewer
(:require
+ [app.common.colors :as clr]
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.geom.point :as gpt]
@@ -142,6 +143,7 @@
(mf/use-effect
(fn []
+ (dom/set-html-theme-color clr/gray-50 "dark")
(let [key1 (events/listen js/window "click" on-click)]
(fn []
(events/unlistenByKey key1)))))
diff --git a/frontend/src/app/main/ui/workspace.cljs b/frontend/src/app/main/ui/workspace.cljs
index 92818e611..17b1fce61 100644
--- a/frontend/src/app/main/ui/workspace.cljs
+++ b/frontend/src/app/main/ui/workspace.cljs
@@ -6,6 +6,7 @@
(ns app.main.ui.workspace
(:require
+ [app.common.colors :as clr]
[app.common.data.macros :as dm]
[app.main.data.messages :as msg]
[app.main.data.workspace :as dw]
@@ -130,8 +131,9 @@
(st/emit! ::dwp/force-persist
(dw/finalize-file project-id file-id))))
- ;; Close any non-modal dialog that may be still open
+ ;; Set html theme color and close any non-modal dialog that may be still open
(mf/with-effect
+ (dom/set-html-theme-color clr/gray-50 "dark")
(st/emit! msg/hide))
;; Set properly the page title
diff --git a/frontend/src/app/util/dom.cljs b/frontend/src/app/util/dom.cljs
index 1c1b4854f..76afe90a5 100644
--- a/frontend/src/app/util/dom.cljs
+++ b/frontend/src/app/util/dom.cljs
@@ -43,6 +43,12 @@
[^string title]
(set! (.-title globals/document) title))
+(defn set-html-theme-color
+ [^string color scheme]
+ (let [meta-node (.querySelector js/document "meta[name='theme-color']")]
+ (.setAttribute meta-node "content" color)
+ (.setAttribute meta-node "media" (str/format "(prefers-color-scheme: %s)" scheme))))
+
(defn set-page-style!
[styles]
(let [node (first (get-elements-by-tag globals/document "head"))