手动编辑主题模板(进阶)
供需要手动编辑 Chrome 主题文件的进阶用户参考。
Awetheme 创作器导出的 ZIP 已包含完整配置。只有需要手动编辑主题文件时,才需要参考本页。
下面给需要手动编辑或对接其他工具的人,提供一份尽量小、但仍能上架的模板。
解压后的目录
my-theme/
|-- manifest.json
|-- icons/
| `-- icon-128.png
`-- images/
`-- theme_ntp_background.jpg (可选)打 ZIP 时注意:压缩包根目录下要直接看到 manifest.json,不要多套一层文件夹。
最小配置示例
{
"manifest_version": 3,
"name": "My Minimal Theme",
"version": "1.0.0",
"description": "A minimal Chrome theme template.",
"icons": {
"128": "icons/icon-128.png"
},
"theme": {
"colors": {
"frame": [26, 32, 44],
"toolbar": [241, 243, 244],
"tab_text": [15, 23, 42],
"ntp_background": [255, 255, 255],
"ntp_text": [15, 23, 42],
"ntp_link": [37, 99, 235],
"omnibox_background": [255, 255, 255],
"omnibox_text": [71, 85, 105]
},
"images": {
"theme_ntp_background": "images/theme_ntp_background.jpg"
},
"properties": {
"ntp_background_alignment": "center",
"ntp_background_repeat": "no-repeat"
}
}
}说明(对应界面区域):
- 颜色:窗口外框、工具栏、标签文字、新标签页背景/文字/链接、地址栏
- 图片:新标签页背景可选;不用图就删掉
images整段 - 布局:背景对齐与是否平铺;没用背景图也可以保留
打包前检查
manifest.json在 ZIP 根目录- 图标文件存在且路径正确
- 引用到的图片都在包内
- 不要用外链图片地址