• Chrome Thems 介绍


    1. 主题

    主题是一种特殊的扩展,可以更改浏览器的外观。但它们不包含JavaScript或HTML代码

    2. 主题编写

    {
        "version":"2.6",
        "name":"camo theme",
        "manifest_version":3,
        "theme":{
            "images":{
                "theme_frame":"images/theme_frame_camo.png",
                "theme_frame_overlay":"images/theme_frame_stripe.png",
                "theme_toolbar":"images/theme_toolbar_camo.png",
                "theme_ntp_background":"images/theme_ntp_background_norepeat.png",
                "theme_ntp_attribution":"images/attribution.png"
            },
            "colors":{
                "frame":[71,105,91],
                "toolbar":[207,211,192],
                "ntp_text":[20,40,0],
                "ntp_section":[36,70,0],
                "ntp_link":[207,221,192],
                "button_background":[255,255,255]
            },
            "tints":{
                "button":[0.33,0.5,0.47]
            },
            "propertites":{
                "ntp_background_alignment":"bottom"
            }
        }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28

    2.1 colors

    RGB模式,可以设置的字段如下:

    • background_tab_inactive
    • background_tab
    • background_tab_incognito
    • background_tab_incognito_inactive
    • bookmark_text
    • button_background
    • frame
    • frame_inactive
    • frame_incognito
    • frame_incognito_inactive
    • ntp_background
    • ntp_header
    • ntp_link
    • ntp_text
    • omnibox_background
    • omnibox_text
    • tab_background_text
    • tab_background_text_inactive
    • tab_background_text_incognito
    • tab_background_text_incognito_inactive
    • tab_text
    • toolbar
    • toolbar_button_icon
    • toolbar_text

    2.2 tints

    可以用来指定要应用于UI的某些部分(如按钮、框架和背景标签也)的色调
    色调采用色相-饱和度-亮度(HSL)格式,使用0-1.0范围内的浮点数

    • 色相 是绝对值,0和1位红色
    • 饱和度 相对于当前提供的图像,0.5表示无变化,0表示完全不饱和,1表示完全饱和
    • 亮度 也是相对的,0.5表示无变化,0表示所有像素为黑色,1表示所有像素为白色

    或者可以说会用任何HSL值来指定无更改-1.0
    可以设置的值如下:

    • background_tab
    • buttons
    • frame
    • frame_inactive
    • frame_incognito
    • frame_incognito_inactive

    2.3 images

    必须是png,否则无法显示。支持的字段如下:

    • theme_frame
    • theme_frame_inactive
    • theme_frame_incognito
    • theme_frame_incognito_inactive
    • theme_toolbar
    • theme_tab_background
    • theme_tab_background_inactive
    • theme_tab_background_incognito
    • theme_tab_background_incognito_inactive
    • theme_tab_background_v
    • theme_ntp_background
    • theme_frame_overlay
    • theme_frame_overlay_inactive
    • theme_button_background
    • theme_ntp_attribution
    • theme_window_control_background

    2.4 properties

    指定背景对齐方式、背景重复和备用logo等属性。支持字段如下:

    • ntp_background_alignment
    • ntp_background_repeat
    • ntp_logo_alternate

    3. 参考

    上述的内容主要来自于官方网站,但是由于需要科学上网,以备不时之需也算是学习笔记。

  • 相关阅读:
    【MySQL进阶之路 | 高级篇】SQL执行过程
    两个事务并发写,能保证数据唯一吗?
    C语言校园家教管理系统
    记一次线上问题,拿到的不是最新的数据 → 偶尔的热情真的难顶呀!
    南通,一座在直播电商里焕新的产业带城市
    数据仓库与数据库的区别
    Fanuc发那科数采
    Linux 内核同步
    PIC10F200单片机编程总结-0
    Spring Cloud的Feign和ribbon和Hystrix超时时间设置及关系
  • 原文地址:https://blog.csdn.net/weixin_41111116/article/details/125917412