-
Notifications
You must be signed in to change notification settings - Fork 0
/
gutenberg-editor-color-pallete.php
66 lines (52 loc) · 1.18 KB
/
gutenberg-editor-color-pallete.php
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
function website_colors_setup() {
// Editor Color Palette
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Black', 'website' ),
'slug' => 'black',
'color' => '#131e29',
),
array(
'name' => __( 'Red', 'website' ),
'slug' => 'red',
'color' => '#E30613',
),
array(
'name' => __( 'Gray', 'website' ),
'slug' => 'gray',
'color' => '#3A3E43',
),
array(
'name' => __( 'Medium Gray', 'website' ),
'slug' => 'medium-gray',
'color' => '#60666E',
),
array(
'name' => __( 'Light Gray', 'website' ),
'slug' => 'light-gray',
'color' => '#DDDFE1',
),
array(
'name' => __( 'Lightest Gray', 'website' ),
'slug' => 'lightest-gray',
'color' => '#F6F7F7',
),
) );
}
add_action( 'after_setup_theme', 'website_colors_setup' );
// SASS
.has-light-gray-background-color {
background: $gray-light;
}
.has-medium-gray-background-color {
background: $gray-medium;
}
.has-light-gray-background-color {
background: $gray-light;
}
.has-lightest-gray-background-color {
background: $gray-lightest;
}
.has-medium-red-background-color {
background: $red;
}