@sealcode/sealgen 0.17.13 → 0.17.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -101,13 +101,13 @@ class ColorsBuilder extends Builder {
|
|
|
101
101
|
group_name
|
|
102
102
|
});
|
|
103
103
|
color_info.shades.forEach((shaded_color, index) => {
|
|
104
|
+
const shade_no = index.toString().padStart(2, "0");
|
|
105
|
+
css_colors += `--color-${group_name}-${color_name}-${shade_no}: ${shaded_color};`;
|
|
104
106
|
if (Math.abs(
|
|
105
107
|
colord(shaded_color).toHsl().l - colord(main_color).toHsl().l
|
|
106
108
|
) < 10) {
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
|
-
const shade_no = index.toString().padStart(2, "0");
|
|
110
|
-
css_colors += `--color-${group_name}-${color_name}-${shade_no}: ${shaded_color};`;
|
|
111
111
|
html_colors += html_color_box({
|
|
112
112
|
color: shaded_color,
|
|
113
113
|
shade_no,
|
package/package.json
CHANGED
|
@@ -119,16 +119,17 @@ export class ColorsBuilder extends Builder {
|
|
|
119
119
|
group_name,
|
|
120
120
|
});
|
|
121
121
|
color_info.shades.forEach((shaded_color, index) => {
|
|
122
|
+
const shade_no = index.toString().padStart(2, "0");
|
|
123
|
+
css_colors += `--color-${group_name}-${color_name}-${shade_no}: ${shaded_color};`;
|
|
122
124
|
if (
|
|
123
125
|
Math.abs(
|
|
124
126
|
colord(shaded_color).toHsl().l -
|
|
125
127
|
colord(main_color).toHsl().l
|
|
126
128
|
) < 10
|
|
127
129
|
) {
|
|
130
|
+
// this color is already in HTML as the main color, skipping adding it to html to avoid duplication
|
|
128
131
|
return;
|
|
129
132
|
}
|
|
130
|
-
const shade_no = index.toString().padStart(2, "0");
|
|
131
|
-
css_colors += `--color-${group_name}-${color_name}-${shade_no}: ${shaded_color};`;
|
|
132
133
|
html_colors += html_color_box({
|
|
133
134
|
color: shaded_color,
|
|
134
135
|
shade_no,
|