【问题标题】:How to change colors of address bar (omnibox) in a Chrome theme?如何更改 Chrome 主题中地址栏(多功能框)的颜色?
【发布时间】:2019-12-14 12:13:51
【问题描述】:

Chrome 最近获得了更新(至少在 Canary 中),您可以在其中修改 Chrome 主题并更改地址栏的背景和文本颜色。但是,我找不到更改这些颜色所需的语法或关键词。

以下内容来自一个名为 Just Black 的主题的 manifest.json 文件。我添加了"omnibox_background": [ 65, 65, 65 ],但它并没有改变地址栏的背景颜色。

{
   "description": "Just Black: when you're feeling extra moody",
   "key": "(long random string of characters)",
   "manifest_version": 2,
   "name": "Just Black",
   "theme": {
      "colors": {
         "bookmark_text": [ 255, 255, 255 ],
         "frame": [ 0, 0, 0 ],
         "ntp_background": [ 0, 0, 0 ],
         "ntp_text": [ 125, 134, 142 ],
         "tab_background_text": [ 255, 255, 255 ],
         "tab_background_text_inactive": [ 255, 255, 255 ],
         "tab_background_text_incognito": [ 255, 255, 255 ],
         "tab_background_text_incognito_inactive": [ 255, 255, 255 ],
         "tab_text": [ 255, 255, 255 ],
         "toolbar": [ 45, 45, 45 ],
         "omnibox_background": [ 65, 65, 65 ]
      },
      "tints": {
         "buttons": [ 0.2, 0.2, 0.9 ],
         "frame_inactive": [ -1, -1, -1 ],
         "frame_incognito": [ -1, -1, -1 ],
         "frame_incognito_inactive": [ -1, -1, -1 ]
      }
   },
   "update_url": "https://clients2.google.com/service/update2/crx",
   "version": "2"
}

【问题讨论】:

  • 没有这样的设置。您必须在 Windows 中添加 --force-dark-mode 命令行开关。
  • @wOxxOm 在金丝雀中对我不起作用
  • 为我和其他人工作。确保您已退出所有 chrome.exe 进程。
  • 我自己的自定义主题适用于该开关,所以我想有一个设置会有所不同:puu.sh/EPmwC/89e53d89c5.zip
  • @wOxxOm 如何在资源管理器的标题栏上保留强调色,但在 Chrome 中不保留?

标签: json google-chrome google-chrome-extension omnibox


【解决方案1】:

我知道我迟到了四个月,但实际上你可以走在正确的轨道上,但如果你将其复制并粘贴到清单中(突出显示整个清单),然后转到chrome://extensions,点击@987654322 @ 在右上角,然后找到主题文件并单击选择文件夹,然后它应该可以工作,如果没有,请再次通过此线程与我联系(编辑:您也可以将 "omnibox_background": [65, 65, 65]"omnibox_text": [255, 255, 255] RGB 值更改为您选择的 RGB 值)

{
   "description": "Just Black: when you're feeling extra moody",
   "key": "(long random string of characters)",
   "manifest_version": 2,
   "name": "Just Black",
   "theme": {
      "colors": {
         "bookmark_text": [ 255, 255, 255 ],
         "frame": [ 0, 0, 0 ],
         "ntp_background": [ 0, 0, 0 ],
         "ntp_text": [ 125, 134, 142 ],
         "omnibox_background": [ 65, 65, 65 ],
         "omnibox_text": [ 255, 255, 255 ],
         "tab_background_text": [ 255, 255, 255 ],
         "tab_background_text_inactive": [ 255, 255, 255 ],
         "tab_background_text_incognito": [ 255, 255, 255 ],
         "tab_background_text_incognito_inactive": [ 255, 255, 255 ],
         "tab_text": [ 255, 255, 255 ],
         "toolbar": [ 45, 45, 45 ],
      },
      "tints": {
         "buttons": [ 0.2, 0.2, 0.9 ],
         "frame_inactive": [ -1, -1, -1 ],
         "frame_incognito": [ -1, -1, -1 ],
         "frame_incognito_inactive": [ -1, -1, -1 ]
      }
   },
   "update_url": "https://clients2.google.com/service/update2/crx",
   "version": "2"
}

【讨论】:

    猜你喜欢
    • 2011-07-25
    • 2015-01-13
    • 2021-09-19
    • 2017-07-23
    • 1970-01-01
    • 2016-08-26
    • 1970-01-01
    • 1970-01-01
    • 2019-02-13
    相关资源
    最近更新 更多