@jjlmoya/utils-games-development 1.55.0 → 1.56.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/package.json +1 -1
- package/src/entries.ts +4 -1
- package/src/index.ts +1 -0
- package/src/tests/contrast_legibility.test.ts +56 -10
- package/src/tests/locale_completeness.test.ts +2 -2
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/localizationSanitizer/localization-sanitizer.css +4 -2
- package/src/tool/pixelArtPaletteSwapper/app-client.ts +229 -0
- package/src/tool/pixelArtPaletteSwapper/bibliography.astro +6 -0
- package/src/tool/pixelArtPaletteSwapper/bibliography.ts +16 -0
- package/src/tool/pixelArtPaletteSwapper/component.astro +153 -0
- package/src/tool/pixelArtPaletteSwapper/entry.ts +28 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/de.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/en.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/es.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/fr.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/id.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/it.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/ja.ts +225 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/ko.ts +225 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/nl.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/pl.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/pt.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/ru.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/sv.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/tr.ts +233 -0
- package/src/tool/pixelArtPaletteSwapper/i18n/zh.ts +225 -0
- package/src/tool/pixelArtPaletteSwapper/index.ts +12 -0
- package/src/tool/pixelArtPaletteSwapper/logic.test.ts +43 -0
- package/src/tool/pixelArtPaletteSwapper/logic.ts +171 -0
- package/src/tool/pixelArtPaletteSwapper/pixel-art-palette-swapper.css +728 -0
- package/src/tool/pixelArtPaletteSwapper/seo.astro +15 -0
- package/src/tool/pixelArtPaletteSwapper/ui.ts +35 -0
- package/src/tool/retroSfxGenerator/client.ts +9 -2
- package/src/tool/retroSfxGenerator/logic.test.ts +21 -0
- package/src/tool/retroSfxGenerator/logic.ts +1 -1
- package/src/tool/retroSfxGenerator/retro-sfx-generator.css +10 -4
- package/src/tools.ts +2 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { PixelArtPaletteSwapperUI } from '../ui';
|
|
3
|
+
|
|
4
|
+
export const content: ToolLocaleContent<PixelArtPaletteSwapperUI> = {
|
|
5
|
+
slug: 'pixel-art-palette-tauscher',
|
|
6
|
+
title: 'Pixel Art Palette Tauscher',
|
|
7
|
+
description: 'Reduzieren Sie Sprites und Spritesheets auf klassische Konsolenpaletten oder eigene Hex-Farben direkt in Ihrem Browser.',
|
|
8
|
+
ui: {
|
|
9
|
+
uploadTitle: 'Sprite oder Spritesheet ablegen',
|
|
10
|
+
uploadHint: 'PNG, JPEG oder WebP bleiben auf Ihrem Gerät',
|
|
11
|
+
chooseImage: 'Bild auswählen',
|
|
12
|
+
replaceImage: 'Bild ersetzen',
|
|
13
|
+
paletteTitle: 'Palette wählen',
|
|
14
|
+
gameBoyPalette: 'Game Boy',
|
|
15
|
+
nesPalette: 'NES inspiriert',
|
|
16
|
+
pico8Palette: 'PICO-8',
|
|
17
|
+
commodore64Palette: 'Commodore 64',
|
|
18
|
+
dawnBringerPalette: 'DawnBringer 16',
|
|
19
|
+
customPalette: 'Benutzerdefinierte Farben',
|
|
20
|
+
customPaletteHint: 'Trennen Sie Hex-Werte durch Kommas, Leerzeichen oder Zeilenumbrüche.',
|
|
21
|
+
applyCustomPalette: 'Palette anwenden',
|
|
22
|
+
resetCustomPalette: 'Zurücksetzen',
|
|
23
|
+
sourcePreview: 'Original',
|
|
24
|
+
resultPreview: 'Reduziertes Ergebnis',
|
|
25
|
+
waitingForImage: 'Warten auf ein Bild',
|
|
26
|
+
uploadToPreview: 'Laden Sie ein Bild hoch, um es vorzuschauen',
|
|
27
|
+
resultEmpty: 'Original und reduzierte Version erscheinen nebeneinander.',
|
|
28
|
+
downloadPng: 'PNG herunterladen',
|
|
29
|
+
downloadDisabled: 'Bild hochladen zum Exportieren.',
|
|
30
|
+
colorCount: 'Quellfarben',
|
|
31
|
+
mappedCount: 'Verwendete Farben',
|
|
32
|
+
imageSize: 'Bildgröße',
|
|
33
|
+
paletteCount: 'Palettenfarben',
|
|
34
|
+
preserveAlpha: 'Transparenz erhalten',
|
|
35
|
+
zoomLabel: 'Zoom',
|
|
36
|
+
processing: 'Pixel werden zugeordnet',
|
|
37
|
+
invalidPalette: 'Mindestens eine gültige Hex-Farbe eingeben',
|
|
38
|
+
invalidImage: 'Wählen Sie ein PNG-, JPEG- oder WebP-Bild',
|
|
39
|
+
readyStatus: 'Bereit',
|
|
40
|
+
dropActive: 'Zum Laden loslassen',
|
|
41
|
+
mappedSummary: '{source} Quellfarben auf {mapped} Palettenfarben abgebildet',
|
|
42
|
+
},
|
|
43
|
+
seo: [
|
|
44
|
+
{
|
|
45
|
+
type: 'title',
|
|
46
|
+
level: 2,
|
|
47
|
+
text: 'Verwandeln Sie Vollfarb-Sprites in Gezielte Retro-Paletten',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'paragraph',
|
|
51
|
+
html: 'Eine begrenzte Palette ist mehr als eine technische Einschränkung. Sie verleiht einem Sprite eine wiedererkennbare Farbsprache, lässt Szenen wie aus einem Guss wirken und erinnert an den visuellen Charakter einer bestimmten Konsole oder Fantasie-Hardware. Dieser browserbasierte Palette-Swapper ermöglicht es Ihnen, das Quellbild mit einer reduzierten Version zu vergleichen, während Sie mit Game Boy, NES-inspirierten, PICO-8, Commodore 64, DawnBringer 16 und eigenen Paletten experimentieren.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'title',
|
|
55
|
+
level: 2,
|
|
56
|
+
text: 'Funktionsweise der Nächstgelegenen Farbreduktion',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'paragraph',
|
|
60
|
+
html: 'Das Werkzeug liest die Rot-, Grün- und Blaukanäle für jeden sichtbaren Pixel und vergleicht diese Farbe mit jeder Farbe der ausgewählten Palette. Es wählt den Paletteneintrag mit dem geringsten quadratischen RGB-Abstand aus und schreibt die Ersatzfarbe in einen neuen Canvas-Puffer. Der Alphakanal bleibt getrennt, sodass transparente Pixel transparent bleiben und halbtransparente Kanten ihre ursprüngliche Deckkraft behalten, wenn Transparenz erhalten aktiviert ist.',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'comparative',
|
|
64
|
+
columns: 2,
|
|
65
|
+
items: [
|
|
66
|
+
{
|
|
67
|
+
title: 'Palettenbegrenzung',
|
|
68
|
+
description: 'Jede Quellfarbe wird durch den nächstgelegenen verfügbaren Farbton ersetzt.',
|
|
69
|
+
points: [
|
|
70
|
+
'Schnell und vorhersehbar für Sprites, Icons, Tilesets und UI-Grafiken',
|
|
71
|
+
'Behält ursprüngliche Maße und Pixelpositionen exakt bei',
|
|
72
|
+
'Ermöglicht eine übersichtliche Kontrolle des festgelegten Farbbudgets',
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'Palette Swapping',
|
|
77
|
+
description: 'Das gleiche Artwork kann auf ein anderes sorgfältig gewähltes Farbset neu abgebildet werden.',
|
|
78
|
+
points: [
|
|
79
|
+
'Nützlich für alternative Kostüme, Biome und Schadenszustände',
|
|
80
|
+
'Benutzerdefinierte Hex-Listen passen sich Ihrer eigenen Art-Direction an',
|
|
81
|
+
'Das heruntergeladene PNG kann direkt in Ihren Editor importiert werden',
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: 'title',
|
|
88
|
+
level: 2,
|
|
89
|
+
text: 'Wahl Einer Palette für Pixel Art',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'table',
|
|
93
|
+
headers: ['Palette', 'Farben', 'Eignung', 'Beachten'],
|
|
94
|
+
rows: [
|
|
95
|
+
['Game Boy', '4', 'Monochromer Handheld-Stil und starke Tonwertstudien', 'Geringer Kontrast kann nahe beieinander liegende Materialien verschmelzen'],
|
|
96
|
+
['NES inspiriert', '16', 'Markante Arcade-Sprites, Charaktere und Tilesets', 'Sehr helle Töne können kleine Details überdecken'],
|
|
97
|
+
['PICO-8', '16', 'Modernes Pixel Art mit kräftigen Farb-Akzenten', 'Hohe Sättigung erfordert gezielt eingesetzten Kontrast'],
|
|
98
|
+
['Commodore 64', '16', 'Dezente Retro-Szenen und Computergame-Ästhetik', 'Niedriger Kontrast profitiert von klaren Silhouetten'],
|
|
99
|
+
['DawnBringer 16', '16', 'Vielseitige handverlesene Palette für allgemeine Pixel-Grafik', 'Farbrampen benötigen weiterhin eine bewusste Lichtrichtung'],
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: 'title',
|
|
104
|
+
level: 2,
|
|
105
|
+
text: 'Praktischer Workflow für Spritesheets',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: 'paragraph',
|
|
109
|
+
html: 'Beginnen Sie mit der größten Quellgrafik, die Sie komfortabel bearbeiten können, und laden Sie das exportierte Sprite oder Spritesheet hier hoch. Wählen Sie eine Voreinstellung, um eine Stilrichtung festzulegen, oder fügen Sie eine eigene Hex-Liste ein. Prüfen Sie beide Bildflächen bei höherem Zoom auf verlorene Gesichtszüge, verschmolzene Konturen oder Highlights. Wenn das Ergebnis matschig wirkt, versuchen Sie eine Palette mit stärkeren Tonwertstufen oder fügen Sie eine gezielte Akzentfarbe hinzu.',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'tip',
|
|
113
|
+
title: 'Palette Bewusst Wählen',
|
|
114
|
+
html: 'Eine größere Farbliste ist nicht automatisch besser. Beginnen Sie mit vier bis sechzehn Farben, weisen Sie jeder Farbe eine klare Aufgabe zu und reservieren Sie die hellsten Werte für Fokusspunkte oder gut lesbare Highlights. Der Algorithmus behält die Pixelpositionen bei, kann aber nicht entscheiden, welche Farben die visuelle Hierarchie Ihres Sprites tragen sollen.',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'title',
|
|
118
|
+
level: 2,
|
|
119
|
+
text: 'Export-Checkliste für Pixel Art',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'diagnostic',
|
|
123
|
+
variant: 'info',
|
|
124
|
+
title: 'Vor dem Import der reduzierten PNG Datei',
|
|
125
|
+
html: 'Überprüfen Sie das Ergebnis bei 100 Prozent sowie im finalen Spielmaßstab, stellen Sie sicher, dass transparente Ränder sauber bleiben, prüfen Sie die Lesbarkeit wichtiger Silhouetten und bewahren Sie die ursprüngliche Quelldatei neben dem Export auf, um die Palette anzupassen ohne von vorn beginnen zu müssen.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'glossary',
|
|
129
|
+
items: [
|
|
130
|
+
{
|
|
131
|
+
term: 'Farbquantisierung',
|
|
132
|
+
definition: 'Der Prozess der Reduzierung einer großen Menge an Quellfarben auf ein kleineres, fest definiertes Farbset.',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
term: 'Farbrampe',
|
|
136
|
+
definition: 'Eine zusammenhängende Folge von dunklen, mittleren und hellen Farben zur Schattierung einer Oberfläche.',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
term: 'Indizierte Palette',
|
|
140
|
+
definition: 'Eine kompakte Farbtabelle, bei der Bildpixel auf Einträge in einer gemeinsamen Liste verweisen, anstatt vollständige Farbwerte zu speichern.',
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
faq: [
|
|
146
|
+
{
|
|
147
|
+
question: 'Werden meine Bilder auf einen Server hochgeladen?',
|
|
148
|
+
answer: 'Nein. Das Bild wird in Ihrem Browser auf einem Canvas decodiert, lokal mit JavaScript verarbeitet und direkt als PNG exportiert. Das Werkzeug enthält keinen Hochladevorgang.',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
question: 'Kann ich meine eigene Palette verwenden?',
|
|
152
|
+
answer: 'Ja. Füge 6-stellige oder 3-stellige Hex-Farbcodes durch Kommas, Leerzeichen oder Zeilenumbrüche getrennt in das Feld für benutzerdefinierte Farben ein und wähle Palette anwenden.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
question: 'Wird die Größe meines Sprites oder Spritesheets verändert?',
|
|
156
|
+
answer: 'Nein. Die Ausgabedatei behält die ursprüngliche Breite, Höhe, Pixelpositionen und Alpha-Werte bei, wenn Transparenz erhalten aktiviert ist.',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
question: 'Welcher Algorithmus wird verwendet?',
|
|
160
|
+
answer: 'Jeder sichtbare Pixel wird der nächstgelegenen Farbe der ausgewählten Palette mithilfe des quadratischen euklidischen Abstands im RGB-Raum zugewiesen. Es ist schnell, deterministisch und einfach vorzuschauen, wendet jedoch kein Dithering oder eine perzeptive Lab-Farbkorrektur an.',
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
howTo: [
|
|
164
|
+
{
|
|
165
|
+
name: 'Sprite laden',
|
|
166
|
+
text: 'Ziehen Sie ein PNG-, JPEG- oder WebP-Sprite oder Spritesheet in den Arbeitsbereich oder nutzen Sie Bild auswählen.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'Palette wählen',
|
|
170
|
+
text: 'Wählen Sie eine klassische Voreinstellung oder geben Sie eigene Hex-Farben ein. Das Ergebnis aktualisiert sich sofort nach dem Anwenden.',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'Vergleichen und exportieren',
|
|
174
|
+
text: 'Inspeizieren Sie das Original und das reduzierte Bild, passen Sie den Vorschau-Zoom an und laden Sie das Ergebnis als PNG herunter.',
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
schemas: [
|
|
178
|
+
{
|
|
179
|
+
'@context': 'https://schema.org',
|
|
180
|
+
'@type': 'SoftwareApplication',
|
|
181
|
+
name: 'Pixel Art Palette Tauscher',
|
|
182
|
+
applicationCategory: 'DesignApplication',
|
|
183
|
+
operatingSystem: 'Any',
|
|
184
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
'@context': 'https://schema.org',
|
|
188
|
+
'@type': 'FAQPage',
|
|
189
|
+
mainEntity: [
|
|
190
|
+
{
|
|
191
|
+
'@type': 'Question',
|
|
192
|
+
name: 'Werden meine Bilder auf einen Server hochgeladen?',
|
|
193
|
+
acceptedAnswer: {
|
|
194
|
+
'@type': 'Answer',
|
|
195
|
+
text: 'Nein. Das Bild wird lokal im Browser verarbeitet und direkt als PNG exportiert.',
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
'@type': 'Question',
|
|
200
|
+
name: 'Kann ich meine eigene Palette verwenden?',
|
|
201
|
+
acceptedAnswer: {
|
|
202
|
+
'@type': 'Answer',
|
|
203
|
+
text: 'Ja. Füge Hex-Farbcodes in das entsprechende Feld ein und wähle Palette anwenden.',
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
'@context': 'https://schema.org',
|
|
210
|
+
'@type': 'HowTo',
|
|
211
|
+
name: 'Wie man ein Sprite auf eine Retro-Palette reduziert',
|
|
212
|
+
step: [
|
|
213
|
+
{ '@type': 'HowToStep', name: 'Sprite laden', text: 'Ziehen Sie ein Bild in den Arbeitsbereich.' },
|
|
214
|
+
{ '@type': 'HowToStep', name: 'Palette wählen', text: 'Wählen Sie ein Preset oder geben Sie Hex-Farben ein.' },
|
|
215
|
+
{ '@type': 'HowToStep', name: 'Vergleichen und exportieren', text: 'Prüfen Sie das Ergebnis und laden Sie das PNG herunter.' },
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
bibliography: [
|
|
220
|
+
{
|
|
221
|
+
name: 'MDN Canvas API',
|
|
222
|
+
url: 'https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'Lospec Palette List',
|
|
226
|
+
url: 'https://lospec.com/palette-list',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'W3C Portable Network Graphics Specification',
|
|
230
|
+
url: 'https://www.w3.org/TR/png-3/',
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
};
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { PixelArtPaletteSwapperUI } from '../ui';
|
|
3
|
+
|
|
4
|
+
export const content: ToolLocaleContent<PixelArtPaletteSwapperUI> = {
|
|
5
|
+
slug: 'pixel-art-palette-swapper',
|
|
6
|
+
title: 'Pixel Art Palette Swapper',
|
|
7
|
+
description: 'Reduce sprites and spritesheets to classic console palettes or a custom set of hex colors directly in your browser.',
|
|
8
|
+
ui: {
|
|
9
|
+
uploadTitle: 'Drop a sprite or spritesheet',
|
|
10
|
+
uploadHint: 'PNG, JPEG, or WebP stays on your device',
|
|
11
|
+
chooseImage: 'Choose image',
|
|
12
|
+
replaceImage: 'Replace image',
|
|
13
|
+
paletteTitle: 'Choose palette',
|
|
14
|
+
gameBoyPalette: 'Game Boy',
|
|
15
|
+
nesPalette: 'NES inspired',
|
|
16
|
+
pico8Palette: 'PICO 8',
|
|
17
|
+
commodore64Palette: 'Commodore 64',
|
|
18
|
+
dawnBringerPalette: 'DawnBringer 16',
|
|
19
|
+
customPalette: 'Custom colors',
|
|
20
|
+
customPaletteHint: 'Separate hex values with commas, spaces, or new lines.',
|
|
21
|
+
applyCustomPalette: 'Apply palette',
|
|
22
|
+
resetCustomPalette: 'Reset',
|
|
23
|
+
sourcePreview: 'Original',
|
|
24
|
+
resultPreview: 'Limited result',
|
|
25
|
+
waitingForImage: 'Waiting for an image',
|
|
26
|
+
uploadToPreview: 'Upload an image to preview it',
|
|
27
|
+
resultEmpty: 'Your original and palette limited versions will appear side by side.',
|
|
28
|
+
downloadPng: 'Download PNG',
|
|
29
|
+
downloadDisabled: 'Upload an image to enable export.',
|
|
30
|
+
colorCount: 'Source colors',
|
|
31
|
+
mappedCount: 'Colors used',
|
|
32
|
+
imageSize: 'Image size',
|
|
33
|
+
paletteCount: 'palette colors',
|
|
34
|
+
preserveAlpha: 'Preserve transparency',
|
|
35
|
+
zoomLabel: 'Zoom',
|
|
36
|
+
processing: 'Mapping pixels',
|
|
37
|
+
invalidPalette: 'Add at least one valid hex color',
|
|
38
|
+
invalidImage: 'Choose a PNG, JPEG, or WebP image',
|
|
39
|
+
readyStatus: 'Ready',
|
|
40
|
+
dropActive: 'Release to load',
|
|
41
|
+
mappedSummary: 'Mapped {source} source colors to {mapped} palette colors',
|
|
42
|
+
},
|
|
43
|
+
seo: [
|
|
44
|
+
{
|
|
45
|
+
type: 'title',
|
|
46
|
+
level: 2,
|
|
47
|
+
text: 'Turn a Full Color Sprite Into a Deliberate Retro Palette',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'paragraph',
|
|
51
|
+
html: 'A limited palette is more than a technical restriction. It gives a sprite a repeatable color vocabulary, makes scenes feel like they belong together, and can suggest the visual character of a specific console or fantasy hardware. This browser based palette swapper lets you compare the source image with a reduced version while you experiment with Game Boy, NES inspired, PICO 8, Commodore 64, DawnBringer 16, and custom palettes.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'title',
|
|
55
|
+
level: 2,
|
|
56
|
+
text: 'How Nearest Color Mapping Works',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'paragraph',
|
|
60
|
+
html: 'The tool reads the red, green, and blue channels for every visible pixel and compares that color with every color in the selected palette. It chooses the palette entry with the smallest squared RGB distance, then writes the replacement color to a new canvas buffer. The alpha channel is kept separate, so transparent pixels remain transparent and partially transparent edges keep their original opacity when Preserve transparency is enabled.',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'comparative',
|
|
64
|
+
columns: 2,
|
|
65
|
+
items: [
|
|
66
|
+
{
|
|
67
|
+
title: 'Palette limitation',
|
|
68
|
+
description: 'Every source color is replaced by its closest available swatch.',
|
|
69
|
+
points: [
|
|
70
|
+
'Fast and predictable for sprites, icons, tiles, and UI art',
|
|
71
|
+
'Keeps the original dimensions and pixel positions',
|
|
72
|
+
'Makes a consistent color budget easy to review',
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'Palette swapping',
|
|
77
|
+
description: 'The same artwork can be remapped to another carefully chosen set.',
|
|
78
|
+
points: [
|
|
79
|
+
'Useful for alternate costumes, biomes, and damage states',
|
|
80
|
+
'Custom hex lists let you match an existing art direction',
|
|
81
|
+
'A downloaded PNG is ready to bring back into your editor',
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: 'title',
|
|
88
|
+
level: 2,
|
|
89
|
+
text: 'Choosing a Palette for Pixel Art',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'table',
|
|
93
|
+
headers: ['Palette', 'Colors', 'Good fit', 'Watch for'],
|
|
94
|
+
rows: [
|
|
95
|
+
['Game Boy', '4', 'Monochrome handheld mood and strong value studies', 'Small value range can merge nearby materials'],
|
|
96
|
+
['NES inspired', '16', 'Chunky arcade sprites, characters, and tiles', 'Very bright colors can overpower small details'],
|
|
97
|
+
['PICO 8', '16', 'Compact modern pixel art with saturated accents', 'Highly saturated hues need deliberate contrast'],
|
|
98
|
+
['Commodore 64', '16', 'Muted retro scenes and computer game aesthetics', 'Low contrast benefits from clear silhouettes'],
|
|
99
|
+
['DawnBringer 16', '16', 'A flexible hand picked palette for general pixel art', 'Ramp colors still need intentional light direction'],
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: 'title',
|
|
104
|
+
level: 2,
|
|
105
|
+
text: 'A Practical Workflow for Spritesheets',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: 'paragraph',
|
|
109
|
+
html: 'Start with the largest source art you can comfortably edit, then upload the exported sprite or spritesheet here. Pick a preset to establish a direction, or paste a custom list from a palette library. Inspect the two canvases at a higher zoom and look for lost facial features, merged outlines, and highlights that no longer separate from their base color. If a result feels muddy, try a palette with a stronger value step or add one deliberate accent color to the custom list.',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'tip',
|
|
113
|
+
title: 'Keep the palette intentional',
|
|
114
|
+
html: 'A larger list is not automatically better. Start with four to sixteen colors, assign each color a job, and reserve the brightest values for focal points or readable highlights. The closest color algorithm preserves positions, but it cannot decide which colors should carry the visual hierarchy of your sprite.',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'title',
|
|
118
|
+
level: 2,
|
|
119
|
+
text: 'Pixel Art Export Checklist',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'diagnostic',
|
|
123
|
+
variant: 'info',
|
|
124
|
+
title: 'Before importing the limited PNG',
|
|
125
|
+
html: 'Check the result at 100 percent and at the final in game scale, confirm that transparent edges are still clean, verify that important silhouettes remain readable, and keep the original source file beside the export so you can revise the palette without starting over.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'glossary',
|
|
129
|
+
items: [
|
|
130
|
+
{
|
|
131
|
+
term: 'Color quantization',
|
|
132
|
+
definition: 'The process of reducing a large set of source colors to a smaller defined set.',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
term: 'Palette ramp',
|
|
136
|
+
definition: 'A related sequence of dark, mid, and light colors used to shade one material or surface.',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
term: 'Indexed palette',
|
|
140
|
+
definition: 'A compact color table where image pixels refer to entries in a shared list instead of storing full colors repeatedly.',
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
faq: [
|
|
146
|
+
{
|
|
147
|
+
question: 'Does the palette swapper upload my image?',
|
|
148
|
+
answer: 'No. The image is decoded into a canvas in your browser, mapped locally with JavaScript, and exported directly as a PNG. The utility has no upload step.',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
question: 'Can I use my own palette?',
|
|
152
|
+
answer: 'Yes. Paste six digit or three digit hex colors into the Custom colors field, separated by commas, spaces, or new lines, then choose Apply palette.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
question: 'Does it resize my sprite or spritesheet?',
|
|
156
|
+
answer: 'No. The output keeps the source width, height, pixel positions, and alpha values when Preserve transparency is enabled.',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
question: 'What algorithm does it use?',
|
|
160
|
+
answer: 'Each visible pixel is assigned to the closest color in the selected palette using squared Euclidean distance in RGB space. It is fast, deterministic, and easy to preview, but it does not apply dithering or perceptual Lab color correction.',
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
howTo: [
|
|
164
|
+
{
|
|
165
|
+
name: 'Load a sprite',
|
|
166
|
+
text: 'Drop a PNG, JPEG, or WebP sprite or spritesheet into the workspace, or use Choose image.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'Choose a palette',
|
|
170
|
+
text: 'Select a classic preset or enter your own hex colors. The result updates immediately when a palette is applied.',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'Compare and export',
|
|
174
|
+
text: 'Inspect the original and limited canvases, adjust the preview zoom, and download the result as a PNG.',
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
schemas: [
|
|
178
|
+
{
|
|
179
|
+
'@context': 'https://schema.org',
|
|
180
|
+
'@type': 'SoftwareApplication',
|
|
181
|
+
name: 'Pixel Art Palette Swapper',
|
|
182
|
+
applicationCategory: 'DesignApplication',
|
|
183
|
+
operatingSystem: 'Any',
|
|
184
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
'@context': 'https://schema.org',
|
|
188
|
+
'@type': 'FAQPage',
|
|
189
|
+
mainEntity: [
|
|
190
|
+
{
|
|
191
|
+
'@type': 'Question',
|
|
192
|
+
name: 'Does the palette swapper upload my image?',
|
|
193
|
+
acceptedAnswer: {
|
|
194
|
+
'@type': 'Answer',
|
|
195
|
+
text: 'No. The image is decoded and mapped locally in the browser, then exported directly as a PNG.',
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
'@type': 'Question',
|
|
200
|
+
name: 'Can I use my own palette?',
|
|
201
|
+
acceptedAnswer: {
|
|
202
|
+
'@type': 'Answer',
|
|
203
|
+
text: 'Yes. Paste valid hex colors into the Custom colors field and apply the palette.',
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
'@context': 'https://schema.org',
|
|
210
|
+
'@type': 'HowTo',
|
|
211
|
+
name: 'How to limit a sprite to a retro palette',
|
|
212
|
+
step: [
|
|
213
|
+
{ '@type': 'HowToStep', name: 'Load a sprite', text: 'Drop an image into the workspace or choose it from your device.' },
|
|
214
|
+
{ '@type': 'HowToStep', name: 'Choose a palette', text: 'Select a preset or apply a custom list of hex colors.' },
|
|
215
|
+
{ '@type': 'HowToStep', name: 'Compare and export', text: 'Review the result and download the limited PNG.' },
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
bibliography: [
|
|
220
|
+
{
|
|
221
|
+
name: 'MDN Canvas API',
|
|
222
|
+
url: 'https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'Lospec Palette List',
|
|
226
|
+
url: 'https://lospec.com/palette-list',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'W3C Portable Network Graphics Specification',
|
|
230
|
+
url: 'https://www.w3.org/TR/png-3/',
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
};
|