@trishchuk/coolors-mcp 1.0.0
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.
- package/.claude/settings.local.json +39 -0
- package/.env +2 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +73 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +71 -0
- package/.github/pull_request_template.md +97 -0
- package/.github/workflows/ci.yml +127 -0
- package/.github/workflows/deploy-docs.yml +56 -0
- package/.github/workflows/release.yml +99 -0
- package/.mcp.json +12 -0
- package/.prettierignore +1 -0
- package/CLAUDE.md +201 -0
- package/DOCUMENTATION.md +274 -0
- package/GEMINI.md +54 -0
- package/LICENSE +21 -0
- package/README.md +401 -0
- package/demo/content_based_color.png +0 -0
- package/demo/music-player.html +621 -0
- package/demo/podcast-player.html +903 -0
- package/dist/bin/coolors-mcp.d.ts +1 -0
- package/dist/bin/coolors-mcp.js +154 -0
- package/dist/bin/coolors-mcp.js.map +1 -0
- package/dist/bin/server.d.ts +1 -0
- package/dist/bin/server.js +3292 -0
- package/dist/bin/server.js.map +1 -0
- package/dist/chunk-IQ7NN26V.js +114 -0
- package/dist/chunk-IQ7NN26V.js.map +1 -0
- package/dist/chunk-P3ARRKLS.js +1214 -0
- package/dist/chunk-P3ARRKLS.js.map +1 -0
- package/dist/color/index.d.ts +716 -0
- package/dist/color/index.js +153 -0
- package/dist/color/index.js.map +1 -0
- package/dist/coolors-mcp.d.ts +136 -0
- package/dist/coolors-mcp.js +7 -0
- package/dist/coolors-mcp.js.map +1 -0
- package/docs/.vitepress/cache/deps/@braintree_sanitize-url.js +93 -0
- package/docs/.vitepress/cache/deps/@braintree_sanitize-url.js.map +7 -0
- package/docs/.vitepress/cache/deps/_metadata.json +127 -0
- package/docs/.vitepress/cache/deps/chunk-BUSYA2B4.js +9 -0
- package/docs/.vitepress/cache/deps/chunk-BUSYA2B4.js.map +7 -0
- package/docs/.vitepress/cache/deps/chunk-JD3CXNQ6.js +12683 -0
- package/docs/.vitepress/cache/deps/chunk-JD3CXNQ6.js.map +7 -0
- package/docs/.vitepress/cache/deps/chunk-SYPOPCWC.js +9719 -0
- package/docs/.vitepress/cache/deps/chunk-SYPOPCWC.js.map +7 -0
- package/docs/.vitepress/cache/deps/cytoscape-cose-bilkent.js +4710 -0
- package/docs/.vitepress/cache/deps/cytoscape-cose-bilkent.js.map +7 -0
- package/docs/.vitepress/cache/deps/cytoscape.js +30278 -0
- package/docs/.vitepress/cache/deps/cytoscape.js.map +7 -0
- package/docs/.vitepress/cache/deps/dayjs.js +285 -0
- package/docs/.vitepress/cache/deps/dayjs.js.map +7 -0
- package/docs/.vitepress/cache/deps/debug.js +468 -0
- package/docs/.vitepress/cache/deps/debug.js.map +7 -0
- package/docs/.vitepress/cache/deps/package.json +3 -0
- package/docs/.vitepress/cache/deps/prismjs.js +1466 -0
- package/docs/.vitepress/cache/deps/prismjs.js.map +7 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-bash.js +228 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-bash.js.map +7 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-javascript.js +142 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-javascript.js.map +7 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-json.js +27 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-json.js.map +7 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-python.js +65 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-python.js.map +7 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-typescript.js +53 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-typescript.js.map +7 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-yaml.js +73 -0
- package/docs/.vitepress/cache/deps/prismjs_components_prism-yaml.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4507 -0
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +584 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js +1146 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js +1667 -0
- package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___minisearch.js +1814 -0
- package/docs/.vitepress/cache/deps/vitepress___minisearch.js.map +7 -0
- package/docs/.vitepress/cache/deps/vue.js +344 -0
- package/docs/.vitepress/cache/deps/vue.js.map +7 -0
- package/docs/.vitepress/components/ClientGrid.vue +125 -0
- package/docs/.vitepress/components/CodeBlock.vue +231 -0
- package/docs/.vitepress/components/ConfigModal.vue +477 -0
- package/docs/.vitepress/components/DiagramModal.vue +528 -0
- package/docs/.vitepress/components/TroubleshootingModal.vue +472 -0
- package/docs/.vitepress/config.js +162 -0
- package/docs/.vitepress/theme/FundingLayout.vue +251 -0
- package/docs/.vitepress/theme/Layout.vue +134 -0
- package/docs/.vitepress/theme/components/AdBanner.vue +317 -0
- package/docs/.vitepress/theme/components/AdPlaceholder.vue +78 -0
- package/docs/.vitepress/theme/components/FundingEffects.vue +322 -0
- package/docs/.vitepress/theme/components/FundingHero.vue +345 -0
- package/docs/.vitepress/theme/components/SupportSection.vue +511 -0
- package/docs/.vitepress/theme/custom-app.css +339 -0
- package/docs/.vitepress/theme/custom.css +699 -0
- package/docs/.vitepress/theme/index.js +25 -0
- package/docs/README.md +198 -0
- package/docs/concepts/accessibility.md +473 -0
- package/docs/concepts/color-spaces.md +222 -0
- package/docs/concepts/distance-metrics.md +384 -0
- package/docs/concepts/hct.md +261 -0
- package/docs/concepts/image-analysis.md +396 -0
- package/docs/concepts/material-design.md +306 -0
- package/docs/concepts/theme-matching.md +399 -0
- package/docs/examples/basic-colors.md +490 -0
- package/docs/examples/creating-themes.md +898 -0
- package/docs/examples/css-refactoring.md +824 -0
- package/docs/examples/image-extraction.md +882 -0
- package/docs/getting-started.md +366 -0
- package/docs/index.md +190 -0
- package/docs/installation.md +157 -0
- package/docs/tools/README.md +234 -0
- package/docs/tools/accessibility.md +614 -0
- package/docs/tools/color-operations.md +374 -0
- package/docs/tools/image-extraction.md +624 -0
- package/docs/tools/material-design.md +347 -0
- package/docs/tools/theme-matching.md +552 -0
- package/eslint.config.ts +14 -0
- package/examples/theme-matching.md +113 -0
- package/jsr.json +7 -0
- package/mcp-config.json +8 -0
- package/note.md +35 -0
- package/package.json +122 -0
- package/research_results.md +53 -0
- package/src/bin/coolors-mcp.ts +194 -0
- package/src/bin/server.ts +61 -0
- package/src/color/__tests__/conversions-argb.test.ts +198 -0
- package/src/color/__tests__/extract-colors.test.ts +360 -0
- package/src/color/__tests__/image-utils.test.ts +242 -0
- package/src/color/__tests__/reference-colors.test.ts +278 -0
- package/src/color/__tests__/round-trip.test.ts +197 -0
- package/src/color/conversions.test.ts +402 -0
- package/src/color/conversions.ts +393 -0
- package/src/color/dislike/__tests__/dislike-analyzer.test.ts +248 -0
- package/src/color/dislike/dislike-analyzer.ts +114 -0
- package/src/color/extract-colors.ts +228 -0
- package/src/color/hct/__tests__/hct-class.test.ts +232 -0
- package/src/color/hct/harmonization.ts +204 -0
- package/src/color/hct/hct-class.ts +109 -0
- package/src/color/hct/hct-solver.ts +168 -0
- package/src/color/hct/index.ts +39 -0
- package/src/color/hct/tonal-palette.ts +211 -0
- package/src/color/hct/types.ts +88 -0
- package/src/color/image-utils.ts +79 -0
- package/src/color/index.ts +87 -0
- package/src/color/material-theme.ts +157 -0
- package/src/color/metrics.test.ts +276 -0
- package/src/color/metrics.ts +281 -0
- package/src/color/quantize/__tests__/quantizer_celebi.test.ts +195 -0
- package/src/color/quantize/lab_point_provider.ts +55 -0
- package/src/color/quantize/point_provider.ts +27 -0
- package/src/color/quantize/quantizer_celebi.ts +51 -0
- package/src/color/quantize/quantizer_celebi_test.ts +71 -0
- package/src/color/quantize/quantizer_map.ts +47 -0
- package/src/color/quantize/quantizer_wsmeans.ts +232 -0
- package/src/color/quantize/quantizer_wu.ts +472 -0
- package/src/color/score/__tests__/score.test.ts +224 -0
- package/src/color/score/score.ts +175 -0
- package/src/color/types.ts +151 -0
- package/src/color/utils/color_utils.ts +292 -0
- package/src/color/utils/math_utils.ts +145 -0
- package/src/color/utils.test.ts +403 -0
- package/src/color/utils.ts +315 -0
- package/src/constants.ts +5 -0
- package/src/coolors-mcp.ts +37 -0
- package/src/examples/addition.ts +333 -0
- package/src/examples/color-demo.ts +125 -0
- package/src/examples/custom-logger.ts +201 -0
- package/src/examples/oauth-server.ts +113 -0
- package/src/examples/session-context.ts +269 -0
- package/src/session.ts +116 -0
- package/src/theme/__tests__/matcher.test.ts +180 -0
- package/src/theme/__tests__/parser.test.ts +148 -0
- package/src/theme/__tests__/refactor.test.ts +224 -0
- package/src/theme/index.ts +34 -0
- package/src/theme/matcher.ts +395 -0
- package/src/theme/parser.ts +392 -0
- package/src/theme/refactor.ts +360 -0
- package/src/theme/types.ts +152 -0
- package/src/tools/__tests__/gradient-generator.test.ts +206 -0
- package/src/tools/__tests__/palette-with-locks.test.ts +109 -0
- package/src/tools/color-conversion.tool.ts +54 -0
- package/src/tools/color-distance.tool.ts +41 -0
- package/src/tools/colors.ts +31 -0
- package/src/tools/contrast-checker.tool.ts +37 -0
- package/src/tools/dislike-analyzer.tool.ts +247 -0
- package/src/tools/gradient-generator.tool.ts +250 -0
- package/src/tools/image-extraction.tools.ts +289 -0
- package/src/tools/index.ts +39 -0
- package/src/tools/material-theme.tools.ts +250 -0
- package/src/tools/palette-generator.tool.ts +135 -0
- package/src/tools/palette-with-locks.tool.ts +221 -0
- package/src/tools/registry.ts +142 -0
- package/src/tools/simple-tools.ts +37 -0
- package/src/tools/theme-matching.tools.ts +334 -0
- package/src/types.ts +182 -0
- package/src/utils.ts +22 -0
- package/tsconfig.json +8 -0
- package/vitest.config.js +15 -0
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="issue-card" @click="openModal">
|
|
3
|
+
<div class="issue-header">
|
|
4
|
+
<h3>{{ title }}</h3>
|
|
5
|
+
<span class="expand-hint">Click to see solution →</span>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="issue-preview">
|
|
8
|
+
{{ preview }}
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<!-- Modal overlay -->
|
|
13
|
+
<div v-if="isOpen" class="issue-modal" @click="closeModal">
|
|
14
|
+
<div class="modal-content" @click.stop>
|
|
15
|
+
<div class="modal-header">
|
|
16
|
+
<div class="modal-title">
|
|
17
|
+
<span class="problem-badge">Problem</span>
|
|
18
|
+
<h2>{{ title }}</h2>
|
|
19
|
+
</div>
|
|
20
|
+
<button @click="closeModal" class="close-btn" title="Close">×</button>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="modal-body">
|
|
24
|
+
<div class="solution-section">
|
|
25
|
+
<h3 class="solution-title">
|
|
26
|
+
<span class="solution-badge">Solution</span>
|
|
27
|
+
</h3>
|
|
28
|
+
<div class="solution-content">
|
|
29
|
+
<slot />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup>
|
|
38
|
+
import { ref, onMounted, onUnmounted, nextTick } from 'vue'
|
|
39
|
+
|
|
40
|
+
const props = defineProps({
|
|
41
|
+
title: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
preview: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: true
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const isOpen = ref(false)
|
|
52
|
+
|
|
53
|
+
const openModal = async () => {
|
|
54
|
+
isOpen.value = true
|
|
55
|
+
document.body.style.overflow = 'hidden'
|
|
56
|
+
|
|
57
|
+
// Wait for modal to render, then add copy buttons
|
|
58
|
+
await nextTick()
|
|
59
|
+
setTimeout(addCopyButtons, 100)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const closeModal = () => {
|
|
63
|
+
isOpen.value = false
|
|
64
|
+
document.body.style.overflow = ''
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const addCopyButtons = () => {
|
|
68
|
+
const modal = document.querySelector('.issue-modal')
|
|
69
|
+
if (!modal) return
|
|
70
|
+
|
|
71
|
+
// Look for all code blocks (pre elements or code elements)
|
|
72
|
+
const codeBlocks = modal.querySelectorAll('pre, code')
|
|
73
|
+
|
|
74
|
+
codeBlocks.forEach((block) => {
|
|
75
|
+
// Skip inline code elements
|
|
76
|
+
if (block.tagName === 'CODE' && block.parentElement.tagName !== 'PRE') {
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Skip if copy button already exists
|
|
81
|
+
if (block.querySelector('.copy-btn') || block.parentElement?.querySelector('.copy-btn')) return
|
|
82
|
+
|
|
83
|
+
// Use pre element for block code, code element for inline
|
|
84
|
+
const targetElement = block.tagName === 'PRE' ? block : block.parentElement
|
|
85
|
+
if (!targetElement) return
|
|
86
|
+
|
|
87
|
+
const copyButton = document.createElement('button')
|
|
88
|
+
copyButton.className = 'copy-btn'
|
|
89
|
+
copyButton.innerHTML = `
|
|
90
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
91
|
+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
|
|
92
|
+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
|
93
|
+
</svg>
|
|
94
|
+
`
|
|
95
|
+
copyButton.title = 'Copy code'
|
|
96
|
+
copyButton.type = 'button'
|
|
97
|
+
|
|
98
|
+
copyButton.addEventListener('click', async (e) => {
|
|
99
|
+
e.preventDefault()
|
|
100
|
+
e.stopPropagation()
|
|
101
|
+
|
|
102
|
+
// Get the code content
|
|
103
|
+
const codeElement = targetElement.querySelector('code') || targetElement
|
|
104
|
+
if (!codeElement) return
|
|
105
|
+
|
|
106
|
+
let textToCopy = codeElement.textContent || codeElement.innerText || ''
|
|
107
|
+
|
|
108
|
+
// Clean up the text (remove extra whitespace, etc.)
|
|
109
|
+
textToCopy = textToCopy.trim()
|
|
110
|
+
|
|
111
|
+
console.log('Attempting to copy:', textToCopy) // Debug log
|
|
112
|
+
|
|
113
|
+
try {
|
|
114
|
+
// Try modern clipboard API first
|
|
115
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
116
|
+
await navigator.clipboard.writeText(textToCopy)
|
|
117
|
+
} else {
|
|
118
|
+
// Fallback for older browsers
|
|
119
|
+
const textArea = document.createElement('textarea')
|
|
120
|
+
textArea.value = textToCopy
|
|
121
|
+
textArea.style.position = 'fixed'
|
|
122
|
+
textArea.style.left = '-9999px'
|
|
123
|
+
document.body.appendChild(textArea)
|
|
124
|
+
textArea.select()
|
|
125
|
+
document.execCommand('copy')
|
|
126
|
+
document.body.removeChild(textArea)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Visual feedback
|
|
130
|
+
copyButton.classList.add('copied')
|
|
131
|
+
copyButton.innerHTML = `
|
|
132
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
133
|
+
<polyline points="20,6 9,17 4,12"></polyline>
|
|
134
|
+
</svg>
|
|
135
|
+
`
|
|
136
|
+
|
|
137
|
+
// Reset after 2 seconds
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
copyButton.classList.remove('copied')
|
|
140
|
+
copyButton.innerHTML = `
|
|
141
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
142
|
+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
|
|
143
|
+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
|
144
|
+
</svg>
|
|
145
|
+
`
|
|
146
|
+
}, 2000)
|
|
147
|
+
|
|
148
|
+
console.log('Copy successful!') // Debug log
|
|
149
|
+
|
|
150
|
+
} catch (err) {
|
|
151
|
+
console.error('Failed to copy code:', err)
|
|
152
|
+
|
|
153
|
+
// Show error feedback
|
|
154
|
+
copyButton.innerHTML = `
|
|
155
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
156
|
+
<circle cx="12" cy="12" r="10"></circle>
|
|
157
|
+
<line x1="15" y1="9" x2="9" y2="15"></line>
|
|
158
|
+
<line x1="9" y1="9" x2="15" y2="15"></line>
|
|
159
|
+
</svg>
|
|
160
|
+
`
|
|
161
|
+
|
|
162
|
+
setTimeout(() => {
|
|
163
|
+
copyButton.innerHTML = `
|
|
164
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
165
|
+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
|
|
166
|
+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
|
167
|
+
</svg>
|
|
168
|
+
`
|
|
169
|
+
}, 2000)
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
// Position the target element and add the button
|
|
174
|
+
targetElement.style.position = 'relative'
|
|
175
|
+
targetElement.appendChild(copyButton)
|
|
176
|
+
})
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const handleKeydown = (e) => {
|
|
180
|
+
if (e.key === 'Escape' && isOpen.value) {
|
|
181
|
+
closeModal()
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
onMounted(() => {
|
|
186
|
+
document.addEventListener('keydown', handleKeydown)
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
onUnmounted(() => {
|
|
190
|
+
document.removeEventListener('keydown', handleKeydown)
|
|
191
|
+
document.body.style.overflow = ''
|
|
192
|
+
})
|
|
193
|
+
</script>
|
|
194
|
+
|
|
195
|
+
<style scoped>
|
|
196
|
+
.issue-card {
|
|
197
|
+
border: 1px solid var(--vp-c-divider);
|
|
198
|
+
border-radius: 8px;
|
|
199
|
+
padding: 16px;
|
|
200
|
+
margin: 12px 0;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
transition: all 0.2s ease;
|
|
203
|
+
background: var(--vp-c-bg-soft);
|
|
204
|
+
border-left: 4px solid #ff6b6b;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.issue-card:hover {
|
|
208
|
+
border-color: var(--vp-c-brand);
|
|
209
|
+
transform: translateY(-1px);
|
|
210
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.issue-header {
|
|
214
|
+
display: flex;
|
|
215
|
+
justify-content: space-between;
|
|
216
|
+
align-items: center;
|
|
217
|
+
margin-bottom: 8px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.issue-header h3 {
|
|
221
|
+
margin: 0;
|
|
222
|
+
font-size: 16px;
|
|
223
|
+
font-weight: 600;
|
|
224
|
+
color: var(--vp-c-text-1);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.expand-hint {
|
|
228
|
+
font-size: 12px;
|
|
229
|
+
color: var(--vp-c-text-3);
|
|
230
|
+
opacity: 0;
|
|
231
|
+
transition: opacity 0.2s ease;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.issue-card:hover .expand-hint {
|
|
235
|
+
opacity: 1;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.issue-preview {
|
|
239
|
+
font-size: 14px;
|
|
240
|
+
color: var(--vp-c-text-2);
|
|
241
|
+
line-height: 1.5;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.issue-modal {
|
|
245
|
+
position: fixed;
|
|
246
|
+
top: 0;
|
|
247
|
+
left: 0;
|
|
248
|
+
width: 100vw;
|
|
249
|
+
height: 100vh;
|
|
250
|
+
background: rgba(0, 0, 0, 0.8);
|
|
251
|
+
display: flex;
|
|
252
|
+
justify-content: center;
|
|
253
|
+
align-items: center;
|
|
254
|
+
z-index: 9999;
|
|
255
|
+
backdrop-filter: blur(3px);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.modal-content {
|
|
259
|
+
background: var(--vp-c-bg);
|
|
260
|
+
border-radius: 12px;
|
|
261
|
+
width: 90vw;
|
|
262
|
+
max-width: 800px;
|
|
263
|
+
max-height: 80vh;
|
|
264
|
+
overflow: hidden;
|
|
265
|
+
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-direction: column;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.modal-header {
|
|
271
|
+
padding: 20px 24px;
|
|
272
|
+
border-bottom: 1px solid var(--vp-c-divider);
|
|
273
|
+
background: var(--vp-c-bg-alt);
|
|
274
|
+
display: flex;
|
|
275
|
+
justify-content: space-between;
|
|
276
|
+
align-items: flex-start;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.modal-title {
|
|
280
|
+
display: flex;
|
|
281
|
+
flex-direction: column;
|
|
282
|
+
gap: 8px;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.modal-title h2 {
|
|
286
|
+
margin: 0;
|
|
287
|
+
font-size: 20px;
|
|
288
|
+
font-weight: 600;
|
|
289
|
+
color: var(--vp-c-text-1);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.problem-badge {
|
|
293
|
+
background: #ff6b6b;
|
|
294
|
+
color: white;
|
|
295
|
+
padding: 4px 8px;
|
|
296
|
+
border-radius: 4px;
|
|
297
|
+
font-size: 11px;
|
|
298
|
+
font-weight: 600;
|
|
299
|
+
text-transform: uppercase;
|
|
300
|
+
letter-spacing: 0.5px;
|
|
301
|
+
width: fit-content;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.solution-badge {
|
|
305
|
+
background: #42b883;
|
|
306
|
+
color: white;
|
|
307
|
+
padding: 4px 8px;
|
|
308
|
+
border-radius: 4px;
|
|
309
|
+
font-size: 11px;
|
|
310
|
+
font-weight: 600;
|
|
311
|
+
text-transform: uppercase;
|
|
312
|
+
letter-spacing: 0.5px;
|
|
313
|
+
width: fit-content;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.close-btn {
|
|
317
|
+
background: none;
|
|
318
|
+
border: none;
|
|
319
|
+
font-size: 24px;
|
|
320
|
+
cursor: pointer;
|
|
321
|
+
color: var(--vp-c-text-2);
|
|
322
|
+
width: 32px;
|
|
323
|
+
height: 32px;
|
|
324
|
+
display: flex;
|
|
325
|
+
align-items: center;
|
|
326
|
+
justify-content: center;
|
|
327
|
+
border-radius: 50%;
|
|
328
|
+
transition: all 0.2s ease;
|
|
329
|
+
margin-left: 16px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.close-btn:hover {
|
|
333
|
+
background: var(--vp-c-bg-soft);
|
|
334
|
+
color: var(--vp-c-text-1);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.modal-body {
|
|
338
|
+
flex: 1;
|
|
339
|
+
overflow-y: auto;
|
|
340
|
+
padding: 24px;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.solution-section {
|
|
344
|
+
display: flex;
|
|
345
|
+
flex-direction: column;
|
|
346
|
+
gap: 16px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.solution-title {
|
|
350
|
+
display: flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
margin: 0;
|
|
353
|
+
font-size: 16px;
|
|
354
|
+
font-weight: 600;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.solution-content {
|
|
358
|
+
line-height: 1.6;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.solution-content :deep(pre) {
|
|
362
|
+
margin: 16px 0;
|
|
363
|
+
border-radius: 6px;
|
|
364
|
+
position: relative;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.solution-content :deep(code) {
|
|
368
|
+
font-size: 13px;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.solution-content :deep(.language-bash),
|
|
372
|
+
.solution-content :deep(.language-json),
|
|
373
|
+
.solution-content :deep(.language-javascript),
|
|
374
|
+
.solution-content :deep([class*="language-"]) {
|
|
375
|
+
position: relative;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.solution-content :deep(.copy-btn) {
|
|
379
|
+
position: absolute;
|
|
380
|
+
top: 8px;
|
|
381
|
+
right: 8px;
|
|
382
|
+
z-index: 10;
|
|
383
|
+
border: 1px solid var(--vp-c-divider);
|
|
384
|
+
border-radius: 4px;
|
|
385
|
+
width: 32px;
|
|
386
|
+
height: 32px;
|
|
387
|
+
background-color: var(--vp-c-bg);
|
|
388
|
+
cursor: pointer;
|
|
389
|
+
transition: all 0.2s ease;
|
|
390
|
+
display: flex;
|
|
391
|
+
align-items: center;
|
|
392
|
+
justify-content: center;
|
|
393
|
+
color: var(--vp-c-text-2);
|
|
394
|
+
opacity: 0;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.solution-content :deep(pre:hover .copy-btn),
|
|
398
|
+
.solution-content :deep(code:hover .copy-btn) {
|
|
399
|
+
opacity: 1;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.solution-content :deep(.copy-btn:hover) {
|
|
403
|
+
border-color: var(--vp-c-brand);
|
|
404
|
+
background-color: var(--vp-c-bg-soft);
|
|
405
|
+
color: var(--vp-c-text-1);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.solution-content :deep(.copy-btn.copied) {
|
|
409
|
+
border-color: var(--vp-c-brand);
|
|
410
|
+
background-color: var(--vp-c-brand-soft);
|
|
411
|
+
color: var(--vp-c-brand);
|
|
412
|
+
opacity: 1;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.solution-content :deep(.copy-btn:active) {
|
|
416
|
+
transform: scale(0.95);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.solution-content :deep(ul),
|
|
420
|
+
.solution-content :deep(ol) {
|
|
421
|
+
margin: 12px 0;
|
|
422
|
+
padding-left: 20px;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.solution-content :deep(li) {
|
|
426
|
+
margin: 6px 0;
|
|
427
|
+
line-height: 1.5;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.solution-content :deep(p) {
|
|
431
|
+
margin: 12px 0;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.solution-content :deep(strong) {
|
|
435
|
+
color: var(--vp-c-brand);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Mobile optimizations */
|
|
439
|
+
@media (max-width: 768px) {
|
|
440
|
+
.modal-content {
|
|
441
|
+
width: 95vw;
|
|
442
|
+
max-height: 90vh;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.modal-header {
|
|
446
|
+
padding: 16px 20px;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.modal-title h2 {
|
|
450
|
+
font-size: 18px;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.modal-body {
|
|
454
|
+
padding: 20px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.issue-card {
|
|
458
|
+
padding: 14px;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.issue-header {
|
|
462
|
+
flex-direction: column;
|
|
463
|
+
align-items: flex-start;
|
|
464
|
+
gap: 4px;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.expand-hint {
|
|
468
|
+
opacity: 1;
|
|
469
|
+
font-size: 11px;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
</style>
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineConfig } from 'vitepress'
|
|
2
|
+
import { withMermaid } from 'vitepress-plugin-mermaid'
|
|
3
|
+
|
|
4
|
+
export default withMermaid(
|
|
5
|
+
defineConfig({
|
|
6
|
+
title: 'Coolors MCP',
|
|
7
|
+
titleTemplate: ':title | Coolors MCP Docs',
|
|
8
|
+
description: 'Advanced color operations MCP server with Material Design 3 support, CSS theme matching, image color extraction, and accessibility compliance.',
|
|
9
|
+
base: '/coolors-mcp/',
|
|
10
|
+
lastUpdated: true,
|
|
11
|
+
cleanUrls: true,
|
|
12
|
+
|
|
13
|
+
// Force dark mode by default
|
|
14
|
+
//appearance: 'dark',
|
|
15
|
+
|
|
16
|
+
head: [
|
|
17
|
+
// Using emoji as favicon
|
|
18
|
+
['link', { rel: 'icon', href: 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">🎨</text></svg>' }],
|
|
19
|
+
['meta', { name: 'theme-color', content: '#0ea5e9' }],
|
|
20
|
+
['meta', { property: 'og:type', content: 'website' }],
|
|
21
|
+
['meta', { property: 'og:locale', content: 'en' }],
|
|
22
|
+
['meta', { property: 'og:title', content: 'Coolors MCP | Advanced Color Operations for MCP' }],
|
|
23
|
+
['meta', { property: 'og:site_name', content: 'Coolors MCP' }],
|
|
24
|
+
['meta', { property: 'og:description', content: 'MCP server for advanced color operations, Material Design themes, CSS refactoring, and image color extraction.' }],
|
|
25
|
+
['meta', { property: 'og:url', content: 'https://x51xxx.github.io/coolors-mcp/' }]
|
|
26
|
+
],
|
|
27
|
+
|
|
28
|
+
themeConfig: {
|
|
29
|
+
// No logo - using text branding instead
|
|
30
|
+
|
|
31
|
+
nav: [
|
|
32
|
+
{ text: 'Home', link: '/' },
|
|
33
|
+
{ text: 'Getting Started', link: '/getting-started' },
|
|
34
|
+
{ text: 'Tools', link: '/tools/README' }
|
|
35
|
+
],
|
|
36
|
+
|
|
37
|
+
sidebar: [
|
|
38
|
+
{
|
|
39
|
+
text: 'Getting Started',
|
|
40
|
+
collapsed: false,
|
|
41
|
+
items: [
|
|
42
|
+
{ text: 'Overview', link: '/' },
|
|
43
|
+
{ text: 'Installation', link: '/installation' },
|
|
44
|
+
{ text: 'Getting Started', link: '/getting-started' }
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
text: 'Core Concepts',
|
|
49
|
+
collapsed: false,
|
|
50
|
+
items: [
|
|
51
|
+
{ text: 'Color Spaces', link: '/concepts/color-spaces' },
|
|
52
|
+
{ text: 'HCT Color System', link: '/concepts/hct' },
|
|
53
|
+
{ text: 'Material Design 3', link: '/concepts/material-design' },
|
|
54
|
+
{ text: 'Theme Matching', link: '/concepts/theme-matching' },
|
|
55
|
+
{ text: 'Image Analysis', link: '/concepts/image-analysis' },
|
|
56
|
+
{ text: 'Accessibility', link: '/concepts/accessibility' }
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
text: 'Tools Reference',
|
|
61
|
+
collapsed: false,
|
|
62
|
+
items: [
|
|
63
|
+
{ text: 'Color Operations', link: '/tools/color-operations' },
|
|
64
|
+
{ text: 'Material Design', link: '/tools/material-design' },
|
|
65
|
+
{ text: 'Theme Matching', link: '/tools/theme-matching' },
|
|
66
|
+
{ text: 'Image Extraction', link: '/tools/image-extraction' },
|
|
67
|
+
{ text: 'Accessibility', link: '/tools/accessibility' }
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
text: 'Examples',
|
|
72
|
+
collapsed: false,
|
|
73
|
+
items: [
|
|
74
|
+
{ text: 'Basic Color Operations', link: '/examples/basic-colors' },
|
|
75
|
+
{ text: 'Creating Themes', link: '/examples/creating-themes' },
|
|
76
|
+
{ text: 'CSS Refactoring', link: '/examples/css-refactoring' },
|
|
77
|
+
{ text: 'Image Color Extraction', link: '/examples/image-extraction' }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
text: 'Resources',
|
|
82
|
+
collapsed: false,
|
|
83
|
+
items: [
|
|
84
|
+
{ text: 'Troubleshooting', link: '/resources/troubleshooting' },
|
|
85
|
+
{ text: 'FAQ', link: '/resources/faq' },
|
|
86
|
+
{ text: 'Contributing', link: '/contributing' }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
text: 'Advanced',
|
|
91
|
+
collapsed: true,
|
|
92
|
+
items: [
|
|
93
|
+
{ text: 'Custom Palettes', link: '/advanced/custom-palettes' },
|
|
94
|
+
{ text: 'Batch Processing', link: '/advanced/batch-processing' },
|
|
95
|
+
{ text: 'Integration Patterns', link: '/advanced/integration' }
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
|
|
100
|
+
socialLinks: [
|
|
101
|
+
{ icon: 'github', link: 'https://github.com/x51xxx/coolors-mcp' }
|
|
102
|
+
],
|
|
103
|
+
|
|
104
|
+
footer: {
|
|
105
|
+
message: 'Released under the MIT License.',
|
|
106
|
+
copyright: `Copyright © ${new Date().getFullYear()} Coolors MCP Contributors`
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
search: {
|
|
110
|
+
provider: 'local',
|
|
111
|
+
options: {
|
|
112
|
+
placeholder: 'Search docs...',
|
|
113
|
+
detailedView: true,
|
|
114
|
+
translations: {
|
|
115
|
+
button: {
|
|
116
|
+
buttonText: 'Search',
|
|
117
|
+
buttonAriaLabel: 'Search documentation'
|
|
118
|
+
},
|
|
119
|
+
modal: {
|
|
120
|
+
noResultsText: 'No results found',
|
|
121
|
+
resetButtonTitle: 'Clear search',
|
|
122
|
+
footer: {
|
|
123
|
+
selectText: 'to select',
|
|
124
|
+
navigateText: 'to navigate',
|
|
125
|
+
closeText: 'to close'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
editLink: {
|
|
133
|
+
pattern: 'https://github.com/x51xxx/coolors-mcp/edit/main/docs/:path',
|
|
134
|
+
text: 'Edit this page on GitHub'
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
lastUpdated: {
|
|
138
|
+
text: 'Last updated',
|
|
139
|
+
formatOptions: {
|
|
140
|
+
dateStyle: 'medium',
|
|
141
|
+
timeStyle: 'short'
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
docFooter: {
|
|
146
|
+
prev: 'Previous page',
|
|
147
|
+
next: 'Next page'
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
outline: {
|
|
151
|
+
label: 'On this page',
|
|
152
|
+
level: [2, 3]
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
returnToTopLabel: 'Return to top',
|
|
156
|
+
sidebarMenuLabel: 'Menu',
|
|
157
|
+
darkModeSwitchLabel: 'Appearance',
|
|
158
|
+
lightModeSwitchTitle: 'Switch to light theme',
|
|
159
|
+
darkModeSwitchTitle: 'Switch to dark theme'
|
|
160
|
+
}
|
|
161
|
+
})
|
|
162
|
+
)
|