admin管理员组文章数量:1335386
I just reinstalled my website with the same theme and now the other default colors are gone. Only black is left.
Is there a way to add more default colors?
I just reinstalled my website with the same theme and now the other default colors are gone. Only black is left.
Is there a way to add more default colors?
Share Improve this question asked May 28, 2020 at 6:23 OokerOoker 3324 silver badges23 bronze badges1 Answer
Reset to default 1You should be able to add more colors using the add_theme_support
function as per the docs here
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'strong magenta', 'themeLangDomain' ),
'slug' => 'strong-magenta',
'color' => '#a156b4',
),
array(
'name' => __( 'light grayish magenta', 'themeLangDomain' ),
'slug' => 'light-grayish-magenta',
'color' => '#d0a5db',
),
array(
'name' => __( 'very light gray', 'themeLangDomain' ),
'slug' => 'very-light-gray',
'color' => '#eee',
),
array(
'name' => __( 'very dark gray', 'themeLangDomain' ),
'slug' => 'very-dark-gray',
'color' => '#444',
),
) );
I hope it helps!
本文标签: themesHow to add more default colors
版权声明:本文标题:themes - How to add more default colors? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742389451a2465696.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论