@trishchuk/coolors-mcp 1.0.0 → 1.0.1

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.
Files changed (66) hide show
  1. package/.claude/settings.local.json +2 -6
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +20 -8
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +22 -8
  4. package/.github/pull_request_template.md +33 -8
  5. package/.github/workflows/ci.yml +97 -97
  6. package/.github/workflows/deploy-docs.yml +9 -9
  7. package/.github/workflows/release.yml +15 -15
  8. package/README.md +26 -1
  9. package/TOOLS_UK.md +233 -0
  10. package/docs/.vitepress/cache/deps/@braintree_sanitize-url.js +30 -12
  11. package/docs/.vitepress/cache/deps/_metadata.json +1 -1
  12. package/docs/.vitepress/cache/deps/chunk-BUSYA2B4.js +9 -6
  13. package/docs/.vitepress/cache/deps/chunk-JD3CXNQ6.js +2543 -1612
  14. package/docs/.vitepress/cache/deps/chunk-SYPOPCWC.js +3508 -2529
  15. package/docs/.vitepress/cache/deps/cytoscape-cose-bilkent.js +1902 -1003
  16. package/docs/.vitepress/cache/deps/cytoscape.js +13303 -7347
  17. package/docs/.vitepress/cache/deps/dayjs.js +494 -272
  18. package/docs/.vitepress/cache/deps/debug.js +82 -38
  19. package/docs/.vitepress/cache/deps/prismjs.js +444 -272
  20. package/docs/.vitepress/cache/deps/prismjs_components_prism-bash.js +80 -73
  21. package/docs/.vitepress/cache/deps/prismjs_components_prism-javascript.js +93 -62
  22. package/docs/.vitepress/cache/deps/prismjs_components_prism-json.js +13 -13
  23. package/docs/.vitepress/cache/deps/prismjs_components_prism-python.js +34 -27
  24. package/docs/.vitepress/cache/deps/prismjs_components_prism-typescript.js +20 -17
  25. package/docs/.vitepress/cache/deps/prismjs_components_prism-yaml.js +75 -41
  26. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +2005 -1438
  27. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +2 -2
  28. package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js +566 -229
  29. package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js +382 -270
  30. package/docs/.vitepress/cache/deps/vitepress___minisearch.js +334 -125
  31. package/docs/.vitepress/cache/deps/vue.js +2 -2
  32. package/docs/.vitepress/components/ClientGrid.vue +9 -3
  33. package/docs/.vitepress/components/CodeBlock.vue +51 -44
  34. package/docs/.vitepress/components/ConfigModal.vue +151 -67
  35. package/docs/.vitepress/components/DiagramModal.vue +186 -154
  36. package/docs/.vitepress/components/TroubleshootingModal.vue +101 -96
  37. package/docs/.vitepress/config.js +171 -141
  38. package/docs/.vitepress/theme/FundingLayout.vue +65 -54
  39. package/docs/.vitepress/theme/Layout.vue +21 -21
  40. package/docs/.vitepress/theme/components/AdBanner.vue +73 -52
  41. package/docs/.vitepress/theme/components/AdPlaceholder.vue +3 -3
  42. package/docs/.vitepress/theme/components/FundingEffects.vue +77 -53
  43. package/docs/.vitepress/theme/components/FundingHero.vue +78 -63
  44. package/docs/.vitepress/theme/components/SupportSection.vue +106 -89
  45. package/docs/.vitepress/theme/custom-app.css +19 -12
  46. package/docs/.vitepress/theme/custom.css +33 -25
  47. package/docs/.vitepress/theme/index.js +19 -16
  48. package/docs/concepts/accessibility.md +59 -47
  49. package/docs/concepts/color-spaces.md +28 -6
  50. package/docs/concepts/distance-metrics.md +45 -30
  51. package/docs/concepts/hct.md +30 -27
  52. package/docs/concepts/image-analysis.md +52 -21
  53. package/docs/concepts/material-design.md +43 -17
  54. package/docs/concepts/theme-matching.md +64 -40
  55. package/docs/examples/basic-colors.md +92 -108
  56. package/docs/examples/creating-themes.md +104 -108
  57. package/docs/examples/css-refactoring.md +33 -29
  58. package/docs/examples/image-extraction.md +145 -138
  59. package/docs/getting-started.md +45 -34
  60. package/docs/index.md +5 -1
  61. package/docs/installation.md +15 -1
  62. package/docs/tools/accessibility.md +74 -68
  63. package/docs/tools/image-extraction.md +62 -54
  64. package/docs/tools/theme-matching.md +45 -42
  65. package/note.md +1 -2
  66. package/package.json +2 -2
package/TOOLS_UK.md ADDED
@@ -0,0 +1,233 @@
1
+ # Інструменти Coolors MCP
2
+
3
+ ## 🎨 Конвертація кольорів
4
+
5
+ ### convert_color
6
+
7
+ Конвертує кольори між форматами: hex, rgb, hsl, lab, hct
8
+
9
+ ```javascript
10
+ { color: "#6366f1", to: "hct" }
11
+ // Результат: "hct(265.8, 87.2, 47.9)"
12
+ ```
13
+
14
+ ## 📏 Вимірювання відстані
15
+
16
+ ### color_distance
17
+
18
+ Обчислює перцептивну відстань між кольорами
19
+
20
+ ```javascript
21
+ { color1: "#6366f1", color2: "#5355d1", metric: "deltaE2000" }
22
+ // Результат: 5.2 (помітна різниця)
23
+ ```
24
+
25
+ ## ♿ Перевірка контрасту
26
+
27
+ ### check_contrast
28
+
29
+ Перевіряє контраст за стандартами WCAG
30
+
31
+ ```javascript
32
+ { foreground: "#000000", background: "#ffffff" }
33
+ // Результат: 21:1 ✓ AAA
34
+ ```
35
+
36
+ ## 🎨 Генерація палітр
37
+
38
+ ### generate_palette
39
+
40
+ Створює палітри: монохроматичні, аналогові, комплементарні, тріадні, тетрадні
41
+
42
+ ```javascript
43
+ { baseColor: "#6366f1", type: "analogous", count: 5 }
44
+ ```
45
+
46
+ ### generate_palette_with_locks
47
+
48
+ Генерує палітру зі збереженням заданих кольорів
49
+
50
+ ```javascript
51
+ { lockedColors: ["#6366f1", "#ec4899"], totalColors: 7, mode: "harmony" }
52
+ ```
53
+
54
+ ### generate_gradient
55
+
56
+ Створює плавні градієнти
57
+
58
+ ```javascript
59
+ {
60
+ colors: ["#6366f1", "#ec4899"],
61
+ steps: 10,
62
+ interpolation: "lab" // lab, hsl, rgb, hct
63
+ }
64
+ ```
65
+
66
+ ## 🎭 Material Design 3
67
+
68
+ ### generate_material_theme
69
+
70
+ Генерує повну тему Material Design 3
71
+
72
+ ```javascript
73
+ { sourceColor: "#6366f1", includeCustomColors: true }
74
+ // Результат: light/dark схеми + тональні палітри
75
+ ```
76
+
77
+ ### generate_tonal_palette
78
+
79
+ Створює тональну палітру (0-100)
80
+
81
+ ```javascript
82
+ { color: "#6366f1", tones: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 99, 100] }
83
+ ```
84
+
85
+ ### harmonize_colors
86
+
87
+ Гармонізує кольори для спільної роботи
88
+
89
+ ```javascript
90
+ { colors: ["#6366f1", "#ec4899", "#10b981"], method: "harmonize", factor: 0.5 }
91
+ ```
92
+
93
+ ## 🔍 Підбір змінних теми
94
+
95
+ ### match_theme_color
96
+
97
+ Знаходить найближчу CSS змінну для кольору
98
+
99
+ ```javascript
100
+ {
101
+ color: "#6366f1",
102
+ themeCSS: ":root { --primary: #6366f1; }",
103
+ context: "background",
104
+ minConfidence: 70
105
+ }
106
+ ```
107
+
108
+ ### refactor_css_with_theme
109
+
110
+ Автоматично замінює кольори на змінні теми
111
+
112
+ ```javascript
113
+ {
114
+ css: ".btn { background: #6366f1; }",
115
+ themeCSS: ":root { --primary: #6366f1; }",
116
+ preserveOriginal: true
117
+ }
118
+ // Результат: .btn { background: var(--primary); /* was: #6366f1 */ }
119
+ ```
120
+
121
+ ### match_theme_colors_batch
122
+
123
+ Підбирає змінні для багатьох кольорів
124
+
125
+ ```javascript
126
+ {
127
+ colors: ["#6366f1", "#ec4899", "#10b981"],
128
+ themeCSS: "/* CSS зі змінними */"
129
+ }
130
+ ```
131
+
132
+ ### generate_theme_css
133
+
134
+ Генерує CSS змінні для теми
135
+
136
+ ```javascript
137
+ {
138
+ sourceColor: "#6366f1",
139
+ prefix: "color",
140
+ includeTones: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 99, 100]
141
+ }
142
+ ```
143
+
144
+ ## 🖼️ Витягування кольорів з зображень
145
+
146
+ ### extract_image_colors
147
+
148
+ Витягує домінантні кольори алгоритмом Celebi
149
+
150
+ ```javascript
151
+ { imageData: [/* RGBA масив */], maxColors: 5, minPopulation: 0.01 }
152
+ // Результат: масив кольорів з популяцією та оцінкою для UI
153
+ ```
154
+
155
+ ### generate_theme_from_image
156
+
157
+ Генерує Material тему з кольорів зображення
158
+
159
+ ```javascript
160
+ {
161
+ imageData: [/* пікселі */],
162
+ variant: "vibrant", // tonalSpot, fidelity, expressive, neutral, monochrome
163
+ contrastLevel: 0.5 // 0 (стандарт), 0.5 (середній), 1.0 (високий)
164
+ }
165
+ ```
166
+
167
+ ## 🚫 Аналіз неприємних кольорів
168
+
169
+ ### analyze_color_likability
170
+
171
+ Перевіряє чи колір у "зоні огиди" (темні жовто-зелені)
172
+
173
+ ```javascript
174
+ { color: "#6b7c3a", autoFix: true }
175
+ // Результат: виправлений колір + пояснення
176
+ ```
177
+
178
+ ### fix_disliked_colors_batch
179
+
180
+ Виправляє кілька неприємних кольорів
181
+
182
+ ```javascript
183
+ {
184
+ colors: ["#6b7c3a", "#5c6b2f"],
185
+ strategy: "both" // shift, lighten, both
186
+ }
187
+ ```
188
+
189
+ ## Ключові особливості
190
+
191
+ ### HCT колірний простір
192
+
193
+ - **Тон** (0-360°): позиція на колірному колі
194
+ - **Хрома** (0-150): насиченість
195
+ - **Тональність** (0-100): світлість з гарантованим контрастом
196
+ - Різниця 40 = контраст 3:1
197
+ - Різниця 50 = контраст 4.5:1
198
+
199
+ ### Алгоритм підбору теми
200
+
201
+ 1. Перцептивна відстань (60%) - схожість за HCT
202
+ 2. Семантичний контекст (20%) - відповідність ролі
203
+ 3. Доступність (20%) - дотримання контрасту
204
+
205
+ ### Варіанти Material теми
206
+
207
+ - **tonalSpot** - збалансована (за замовчуванням)
208
+ - **fidelity** - зберігає бренд-колір точно
209
+ - **vibrant** - яскрава, грайлива
210
+ - **expressive** - креативні комбінації
211
+ - **neutral** - професійна, мінімальна
212
+ - **monochrome** - один відтінок
213
+
214
+ ## Швидкий старт
215
+
216
+ ### Claude Desktop
217
+
218
+ ```json
219
+ {
220
+ "mcpServers": {
221
+ "coolors": {
222
+ "command": "npx",
223
+ "args": ["-y", "@trishchuk/coolors-mcp"]
224
+ }
225
+ }
226
+ }
227
+ ```
228
+
229
+ ### Claude Code
230
+
231
+ ```bash
232
+ claude mcp add coolors --npm-package @trishchuk/coolors-mcp
233
+ ```
@@ -1,22 +1,29 @@
1
- import {
2
- __commonJS
3
- } from "./chunk-BUSYA2B4.js";
1
+ import { __commonJS } from "./chunk-BUSYA2B4.js";
4
2
 
5
3
  // node_modules/@braintree/sanitize-url/dist/constants.js
6
4
  var require_constants = __commonJS({
7
5
  "node_modules/@braintree/sanitize-url/dist/constants.js"(exports) {
8
6
  "use strict";
9
7
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.BLANK_URL = exports.relativeFirstCharacters = exports.whitespaceEscapeCharsRegex = exports.urlSchemeRegex = exports.ctrlCharactersRegex = exports.htmlCtrlEntityRegex = exports.htmlEntitiesRegex = exports.invalidProtocolRegex = void 0;
8
+ exports.BLANK_URL =
9
+ exports.relativeFirstCharacters =
10
+ exports.whitespaceEscapeCharsRegex =
11
+ exports.urlSchemeRegex =
12
+ exports.ctrlCharactersRegex =
13
+ exports.htmlCtrlEntityRegex =
14
+ exports.htmlEntitiesRegex =
15
+ exports.invalidProtocolRegex =
16
+ void 0;
11
17
  exports.invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im;
12
18
  exports.htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g;
13
19
  exports.htmlCtrlEntityRegex = /&(newline|tab);/gi;
14
- exports.ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;
20
+ exports.ctrlCharactersRegex =
21
+ /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;
15
22
  exports.urlSchemeRegex = /^.+(:|:)/gim;
16
23
  exports.whitespaceEscapeCharsRegex = /(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;
17
24
  exports.relativeFirstCharacters = [".", "/"];
18
25
  exports.BLANK_URL = "about:blank";
19
- }
26
+ },
20
27
  });
21
28
 
22
29
  // node_modules/@braintree/sanitize-url/dist/index.js
@@ -30,9 +37,12 @@ var require_dist = __commonJS({
30
37
  }
31
38
  function decodeHtmlCharacters(str) {
32
39
  var removedNullByte = str.replace(constants_1.ctrlCharactersRegex, "");
33
- return removedNullByte.replace(constants_1.htmlEntitiesRegex, function(match, dec) {
34
- return String.fromCharCode(dec);
35
- });
40
+ return removedNullByte.replace(
41
+ constants_1.htmlEntitiesRegex,
42
+ function (match, dec) {
43
+ return String.fromCharCode(dec);
44
+ },
45
+ );
36
46
  }
37
47
  function isValidUrl(url) {
38
48
  return URL.canParse(url);
@@ -51,9 +61,17 @@ var require_dist = __commonJS({
51
61
  var charsToDecode;
52
62
  var decodedUrl = decodeURI(url.trim());
53
63
  do {
54
- decodedUrl = decodeHtmlCharacters(decodedUrl).replace(constants_1.htmlCtrlEntityRegex, "").replace(constants_1.ctrlCharactersRegex, "").replace(constants_1.whitespaceEscapeCharsRegex, "").trim();
64
+ decodedUrl = decodeHtmlCharacters(decodedUrl)
65
+ .replace(constants_1.htmlCtrlEntityRegex, "")
66
+ .replace(constants_1.ctrlCharactersRegex, "")
67
+ .replace(constants_1.whitespaceEscapeCharsRegex, "")
68
+ .trim();
55
69
  decodedUrl = decodeURI(decodedUrl);
56
- charsToDecode = decodedUrl.match(constants_1.ctrlCharactersRegex) || decodedUrl.match(constants_1.htmlEntitiesRegex) || decodedUrl.match(constants_1.htmlCtrlEntityRegex) || decodedUrl.match(constants_1.whitespaceEscapeCharsRegex);
70
+ charsToDecode =
71
+ decodedUrl.match(constants_1.ctrlCharactersRegex) ||
72
+ decodedUrl.match(constants_1.htmlEntitiesRegex) ||
73
+ decodedUrl.match(constants_1.htmlCtrlEntityRegex) ||
74
+ decodedUrl.match(constants_1.whitespaceEscapeCharsRegex);
57
75
  } while (charsToDecode && charsToDecode.length > 0);
58
76
  var sanitizedUrl = decodedUrl;
59
77
  if (!sanitizedUrl) {
@@ -87,7 +105,7 @@ var require_dist = __commonJS({
87
105
  return backSanitized;
88
106
  }
89
107
  exports.sanitizeUrl = sanitizeUrl;
90
- }
108
+ },
91
109
  });
92
110
  export default require_dist();
93
111
  //# sourceMappingURL=@braintree_sanitize-url.js.map
@@ -124,4 +124,4 @@
124
124
  "file": "chunk-BUSYA2B4.js"
125
125
  }
126
126
  }
127
- }
127
+ }
@@ -1,9 +1,12 @@
1
1
  var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __commonJS = (cb, mod) => function __require() {
3
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
- };
2
+ var __commonJS = (cb, mod) =>
3
+ function __require() {
4
+ return (
5
+ mod ||
6
+ (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod),
7
+ mod.exports
8
+ );
9
+ };
5
10
 
6
- export {
7
- __commonJS
8
- };
11
+ export { __commonJS };
9
12
  //# sourceMappingURL=chunk-BUSYA2B4.js.map