@xivdyetools/core 1.6.0 → 1.7.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/dist/data/character_colors.json +1 -0
- package/dist/data/locales/de.json +1 -1
- package/dist/data/locales/en.json +1 -1
- package/dist/data/locales/fr.json +1 -1
- package/dist/data/locales/ja.json +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/services/CharacterColorService.d.ts +125 -0
- package/dist/services/CharacterColorService.d.ts.map +1 -0
- package/dist/services/CharacterColorService.js +223 -0
- package/dist/services/CharacterColorService.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,13 @@ export { LocalizationService } from './services/LocalizationService.js';
|
|
|
6
6
|
export { PresetService } from './services/PresetService.js';
|
|
7
7
|
export { PaletteService } from './services/PaletteService.js';
|
|
8
8
|
export type { PaletteExtractionOptions, ExtractedColor, PaletteMatch, PaletteServiceOptions, } from './services/PaletteService.js';
|
|
9
|
-
export
|
|
10
|
-
export {
|
|
9
|
+
export { CharacterColorService } from './services/CharacterColorService.js';
|
|
10
|
+
export type { Dye, LocalizedDye, RGB, HSV, HexColor, VisionType, Matrix3x3, ColorblindMatrices, ErrorSeverity, PriceData, CachedData, LocaleCode, TranslationKey, HarmonyTypeKey, JobKey, GrandCompanyKey, LocaleData, LocalePreference, Logger, PresetCategory, CategoryMeta, PresetPalette, ResolvedPreset, PresetData, PresetStatus, CommunityPreset, PresetSubmission, PresetListResponse, PresetSubmitResponse, VoteResponse, PresetFilters, CharacterColor, CharacterColorMatch, SubRace, Gender, Race, } from './types/index.js';
|
|
11
|
+
export { AppError, ErrorCode, createHexColor, NoOpLogger, ConsoleLogger, RACE_SUBRACES, SUBRACE_TO_RACE, COLOR_GRID_DIMENSIONS, } from './types/index.js';
|
|
11
12
|
export { RGB_MIN, RGB_MAX, HUE_MIN, HUE_MAX, SATURATION_MIN, SATURATION_MAX, VALUE_MIN, VALUE_MAX, COLOR_DISTANCE_MAX, VISION_TYPES, VISION_TYPE_LABELS, BRETTEL_MATRICES, PATTERNS, UNIVERSALIS_API_BASE, UNIVERSALIS_API_TIMEOUT, UNIVERSALIS_API_RETRY_COUNT, UNIVERSALIS_API_RETRY_DELAY, API_CACHE_TTL, API_DEBOUNCE_DELAY, API_CACHE_VERSION, API_MAX_RESPONSE_SIZE, API_RATE_LIMIT_DELAY, } from './constants/index.js';
|
|
12
13
|
export { clamp, lerp, round, distance, unique, groupBy, sortByProperty, filterNulls, isValidHexColor, isValidRGB, isValidHSV, isString, isNumber, isArray, isObject, isNullish, sleep, retry, isAbortError, generateChecksum, } from './utils/index.js';
|
|
13
14
|
export { default as dyeDatabase } from './data/colors_xiv.json';
|
|
14
15
|
export { default as presetData } from './data/presets.json';
|
|
16
|
+
export { default as characterColorData } from './data/character_colors.json';
|
|
15
17
|
export { VERSION } from './version.js';
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,6BA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L,QAAQ,EACR,SAAS,EACT,cAAc,EACd,UAAU,EACV,aAAa,EAEb,aAAa,EACb,eAAe,EACf,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,cAAc,EACd,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAuB;AACtF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAuB;AAClF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAuB;AAGnG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,10 @@ export { APIService, MemoryCacheBackend } from './services/APIService.js';
|
|
|
5
5
|
export { LocalizationService } from './services/LocalizationService.js';
|
|
6
6
|
export { PresetService } from './services/PresetService.js';
|
|
7
7
|
export { PaletteService } from './services/PaletteService.js';
|
|
8
|
-
export {
|
|
8
|
+
export { CharacterColorService } from './services/CharacterColorService.js';
|
|
9
|
+
export { AppError, ErrorCode, createHexColor, NoOpLogger, ConsoleLogger,
|
|
10
|
+
// Character constants
|
|
11
|
+
RACE_SUBRACES, SUBRACE_TO_RACE, COLOR_GRID_DIMENSIONS, } from './types/index.js';
|
|
9
12
|
// Constants
|
|
10
13
|
export { RGB_MIN, RGB_MAX, HUE_MIN, HUE_MAX, SATURATION_MIN, SATURATION_MAX, VALUE_MIN, VALUE_MAX, COLOR_DISTANCE_MAX, VISION_TYPES, VISION_TYPE_LABELS, BRETTEL_MATRICES, PATTERNS, UNIVERSALIS_API_BASE, UNIVERSALIS_API_TIMEOUT, UNIVERSALIS_API_RETRY_COUNT, UNIVERSALIS_API_RETRY_DELAY, API_CACHE_TTL, API_DEBOUNCE_DELAY, API_CACHE_VERSION, API_MAX_RESPONSE_SIZE, API_RATE_LIMIT_DELAY, } from './constants/index.js';
|
|
11
14
|
// Utils
|
|
@@ -13,6 +16,7 @@ export { clamp, lerp, round, distance, unique, groupBy, sortByProperty, filterNu
|
|
|
13
16
|
// Data (for browser environments - to be injected)
|
|
14
17
|
export { default as dyeDatabase } from './data/colors_xiv.json' with { type: 'json' };
|
|
15
18
|
export { default as presetData } from './data/presets.json' with { type: 'json' };
|
|
19
|
+
export { default as characterColorData } from './data/character_colors.json' with { type: 'json' };
|
|
16
20
|
// Version (auto-generated from package.json during build)
|
|
17
21
|
export { VERSION } from './version.js';
|
|
18
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,aAAa,EA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,KAAK,EACL,YAAY,EACZ,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B,mDAAmD;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEnG,0DAA0D;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @xivdyetools/core - Character Color Service
|
|
3
|
+
*
|
|
4
|
+
* Service for accessing FFXIV character customization colors and
|
|
5
|
+
* finding matching dyes for hair, eye, skin tones etc.
|
|
6
|
+
*
|
|
7
|
+
* @module services/CharacterColorService
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { CharacterColorService, DyeService, dyeDatabase } from '@xivdyetools/core';
|
|
11
|
+
*
|
|
12
|
+
* const characterColors = new CharacterColorService();
|
|
13
|
+
* const dyeService = new DyeService(dyeDatabase);
|
|
14
|
+
*
|
|
15
|
+
* // Get all eye colors
|
|
16
|
+
* const eyeColors = characterColors.getEyeColors();
|
|
17
|
+
*
|
|
18
|
+
* // Find closest dyes to an eye color
|
|
19
|
+
* const matches = characterColors.findClosestDyes(eyeColors[47], dyeService, 3);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
import type { CharacterColor, CharacterColorMatch, SharedColorCategory, RaceSpecificColorCategory, SubRace, Gender } from '@xivdyetools/types';
|
|
23
|
+
import type { DyeService } from './DyeService.js';
|
|
24
|
+
/**
|
|
25
|
+
* Service for accessing FFXIV character customization colors
|
|
26
|
+
*/
|
|
27
|
+
export declare class CharacterColorService {
|
|
28
|
+
private data;
|
|
29
|
+
constructor();
|
|
30
|
+
/**
|
|
31
|
+
* Get all eye colors (192 colors)
|
|
32
|
+
*/
|
|
33
|
+
getEyeColors(): CharacterColor[];
|
|
34
|
+
/**
|
|
35
|
+
* Get all hair highlight colors (192 colors)
|
|
36
|
+
*/
|
|
37
|
+
getHighlightColors(): CharacterColor[];
|
|
38
|
+
/**
|
|
39
|
+
* Get all dark lip colors (96 colors)
|
|
40
|
+
*/
|
|
41
|
+
getLipColorsDark(): CharacterColor[];
|
|
42
|
+
/**
|
|
43
|
+
* Get all light lip colors (96 colors)
|
|
44
|
+
*/
|
|
45
|
+
getLipColorsLight(): CharacterColor[];
|
|
46
|
+
/**
|
|
47
|
+
* Get all tattoo/limbal ring colors (192 colors)
|
|
48
|
+
*/
|
|
49
|
+
getTattooColors(): CharacterColor[];
|
|
50
|
+
/**
|
|
51
|
+
* Get all dark face paint colors (96 colors)
|
|
52
|
+
*/
|
|
53
|
+
getFacePaintColorsDark(): CharacterColor[];
|
|
54
|
+
/**
|
|
55
|
+
* Get all light face paint colors (96 colors)
|
|
56
|
+
*/
|
|
57
|
+
getFacePaintColorsLight(): CharacterColor[];
|
|
58
|
+
/**
|
|
59
|
+
* Get shared colors by category
|
|
60
|
+
*/
|
|
61
|
+
getSharedColors(category: SharedColorCategory): CharacterColor[];
|
|
62
|
+
/**
|
|
63
|
+
* Get hair colors for a specific subrace and gender (192 colors each)
|
|
64
|
+
*/
|
|
65
|
+
getHairColors(subrace: SubRace, gender: Gender): CharacterColor[];
|
|
66
|
+
/**
|
|
67
|
+
* Get skin colors for a specific subrace and gender (192 colors each)
|
|
68
|
+
*/
|
|
69
|
+
getSkinColors(subrace: SubRace, gender: Gender): CharacterColor[];
|
|
70
|
+
/**
|
|
71
|
+
* Get race-specific colors by category
|
|
72
|
+
*/
|
|
73
|
+
getRaceSpecificColors(category: RaceSpecificColorCategory, subrace: SubRace, gender: Gender): CharacterColor[];
|
|
74
|
+
/**
|
|
75
|
+
* Find the closest matching dyes to a character color
|
|
76
|
+
*
|
|
77
|
+
* @param color - The character color to match
|
|
78
|
+
* @param dyeService - DyeService instance for dye lookup
|
|
79
|
+
* @param count - Number of matches to return (default: 3)
|
|
80
|
+
* @returns Array of matches sorted by distance (closest first)
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const eyeColor = characterColors.getEyeColors()[47];
|
|
85
|
+
* const matches = characterColors.findClosestDyes(eyeColor, dyeService, 3);
|
|
86
|
+
*
|
|
87
|
+
* console.log(matches[0].dye.name); // "Chestnut Brown"
|
|
88
|
+
* console.log(matches[0].distance); // 4.2
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
findClosestDyes(color: CharacterColor, dyeService: DyeService, count?: number): CharacterColorMatch[];
|
|
92
|
+
/**
|
|
93
|
+
* Find the single closest dye to a character color
|
|
94
|
+
*/
|
|
95
|
+
findClosestDye(color: CharacterColor, dyeService: DyeService): CharacterColorMatch | null;
|
|
96
|
+
/**
|
|
97
|
+
* Find all dyes within a color distance threshold
|
|
98
|
+
*/
|
|
99
|
+
findDyesWithinDistance(color: CharacterColor, dyeService: DyeService, maxDistance: number): CharacterColorMatch[];
|
|
100
|
+
/**
|
|
101
|
+
* Get a specific color by index from a shared category
|
|
102
|
+
*/
|
|
103
|
+
getSharedColorByIndex(category: SharedColorCategory, index: number): CharacterColor | null;
|
|
104
|
+
/**
|
|
105
|
+
* Get a specific color by index from a race-specific category
|
|
106
|
+
*/
|
|
107
|
+
getRaceSpecificColorByIndex(category: RaceSpecificColorCategory, subrace: SubRace, gender: Gender, index: number): CharacterColor | null;
|
|
108
|
+
/**
|
|
109
|
+
* Get all available subraces
|
|
110
|
+
*/
|
|
111
|
+
getAvailableSubraces(): SubRace[];
|
|
112
|
+
/**
|
|
113
|
+
* Get the data version
|
|
114
|
+
*/
|
|
115
|
+
getVersion(): string;
|
|
116
|
+
/**
|
|
117
|
+
* Get grid column count (always 8)
|
|
118
|
+
*/
|
|
119
|
+
getGridColumns(): number;
|
|
120
|
+
/**
|
|
121
|
+
* Calculate Euclidean distance in RGB space
|
|
122
|
+
*/
|
|
123
|
+
private calculateDistance;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=CharacterColorService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CharacterColorService.d.ts","sourceRoot":"","sources":["../../src/services/CharacterColorService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,OAAO,EACP,MAAM,EACP,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAqBlD;;GAEG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,IAAI,CAAqB;;IAUjC;;OAEG;IACH,YAAY,IAAI,cAAc,EAAE;IAIhC;;OAEG;IACH,kBAAkB,IAAI,cAAc,EAAE;IAItC;;OAEG;IACH,gBAAgB,IAAI,cAAc,EAAE;IAIpC;;OAEG;IACH,iBAAiB,IAAI,cAAc,EAAE;IAIrC;;OAEG;IACH,eAAe,IAAI,cAAc,EAAE;IAInC;;OAEG;IACH,sBAAsB,IAAI,cAAc,EAAE;IAI1C;;OAEG;IACH,uBAAuB,IAAI,cAAc,EAAE;IAI3C;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,mBAAmB,GAAG,cAAc,EAAE;IAQhE;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE;IAIjE;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE;IAIjE;;OAEG;IACH,qBAAqB,CACnB,QAAQ,EAAE,yBAAyB,EACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACb,cAAc,EAAE;IAQnB;;;;;;;;;;;;;;;;OAgBG;IACH,eAAe,CACb,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,UAAU,EACtB,KAAK,GAAE,MAAU,GAChB,mBAAmB,EAAE;IAuBxB;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,GAAG,mBAAmB,GAAG,IAAI;IAKzF;;OAEG;IACH,sBAAsB,CACpB,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,MAAM,GAClB,mBAAmB,EAAE;IA2BxB;;OAEG;IACH,qBAAqB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI;IAK1F;;OAEG;IACH,2BAA2B,CACzB,QAAQ,EAAE,yBAAyB,EACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,cAAc,GAAG,IAAI;IASxB;;OAEG;IACH,oBAAoB,IAAI,OAAO,EAAE;IAKjC;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,cAAc,IAAI,MAAM;IAQxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAM1B"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @xivdyetools/core - Character Color Service
|
|
3
|
+
*
|
|
4
|
+
* Service for accessing FFXIV character customization colors and
|
|
5
|
+
* finding matching dyes for hair, eye, skin tones etc.
|
|
6
|
+
*
|
|
7
|
+
* @module services/CharacterColorService
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { CharacterColorService, DyeService, dyeDatabase } from '@xivdyetools/core';
|
|
11
|
+
*
|
|
12
|
+
* const characterColors = new CharacterColorService();
|
|
13
|
+
* const dyeService = new DyeService(dyeDatabase);
|
|
14
|
+
*
|
|
15
|
+
* // Get all eye colors
|
|
16
|
+
* const eyeColors = characterColors.getEyeColors();
|
|
17
|
+
*
|
|
18
|
+
* // Find closest dyes to an eye color
|
|
19
|
+
* const matches = characterColors.findClosestDyes(eyeColors[47], dyeService, 3);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
// Import character color data
|
|
23
|
+
import characterColorData from '../data/character_colors.json';
|
|
24
|
+
/**
|
|
25
|
+
* Service for accessing FFXIV character customization colors
|
|
26
|
+
*/
|
|
27
|
+
export class CharacterColorService {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.data = characterColorData;
|
|
30
|
+
}
|
|
31
|
+
// ==========================================================================
|
|
32
|
+
// Shared Colors (Race-Agnostic)
|
|
33
|
+
// ==========================================================================
|
|
34
|
+
/**
|
|
35
|
+
* Get all eye colors (192 colors)
|
|
36
|
+
*/
|
|
37
|
+
getEyeColors() {
|
|
38
|
+
return this.data.shared.eyeColors || [];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get all hair highlight colors (192 colors)
|
|
42
|
+
*/
|
|
43
|
+
getHighlightColors() {
|
|
44
|
+
return this.data.shared.highlightColors || [];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get all dark lip colors (96 colors)
|
|
48
|
+
*/
|
|
49
|
+
getLipColorsDark() {
|
|
50
|
+
return this.data.shared.lipColorsDark || [];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get all light lip colors (96 colors)
|
|
54
|
+
*/
|
|
55
|
+
getLipColorsLight() {
|
|
56
|
+
return this.data.shared.lipColorsLight || [];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get all tattoo/limbal ring colors (192 colors)
|
|
60
|
+
*/
|
|
61
|
+
getTattooColors() {
|
|
62
|
+
return this.data.shared.tattooColors || [];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get all dark face paint colors (96 colors)
|
|
66
|
+
*/
|
|
67
|
+
getFacePaintColorsDark() {
|
|
68
|
+
return this.data.shared.facePaintColorsDark || [];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Get all light face paint colors (96 colors)
|
|
72
|
+
*/
|
|
73
|
+
getFacePaintColorsLight() {
|
|
74
|
+
return this.data.shared.facePaintColorsLight || [];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get shared colors by category
|
|
78
|
+
*/
|
|
79
|
+
getSharedColors(category) {
|
|
80
|
+
return this.data.shared[category] || [];
|
|
81
|
+
}
|
|
82
|
+
// ==========================================================================
|
|
83
|
+
// Race-Specific Colors
|
|
84
|
+
// ==========================================================================
|
|
85
|
+
/**
|
|
86
|
+
* Get hair colors for a specific subrace and gender (192 colors each)
|
|
87
|
+
*/
|
|
88
|
+
getHairColors(subrace, gender) {
|
|
89
|
+
return this.data.raceSpecific.hairColors?.[subrace]?.[gender] || [];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get skin colors for a specific subrace and gender (192 colors each)
|
|
93
|
+
*/
|
|
94
|
+
getSkinColors(subrace, gender) {
|
|
95
|
+
return this.data.raceSpecific.skinColors?.[subrace]?.[gender] || [];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get race-specific colors by category
|
|
99
|
+
*/
|
|
100
|
+
getRaceSpecificColors(category, subrace, gender) {
|
|
101
|
+
return this.data.raceSpecific[category]?.[subrace]?.[gender] || [];
|
|
102
|
+
}
|
|
103
|
+
// ==========================================================================
|
|
104
|
+
// Color Matching
|
|
105
|
+
// ==========================================================================
|
|
106
|
+
/**
|
|
107
|
+
* Find the closest matching dyes to a character color
|
|
108
|
+
*
|
|
109
|
+
* @param color - The character color to match
|
|
110
|
+
* @param dyeService - DyeService instance for dye lookup
|
|
111
|
+
* @param count - Number of matches to return (default: 3)
|
|
112
|
+
* @returns Array of matches sorted by distance (closest first)
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* const eyeColor = characterColors.getEyeColors()[47];
|
|
117
|
+
* const matches = characterColors.findClosestDyes(eyeColor, dyeService, 3);
|
|
118
|
+
*
|
|
119
|
+
* console.log(matches[0].dye.name); // "Chestnut Brown"
|
|
120
|
+
* console.log(matches[0].distance); // 4.2
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
findClosestDyes(color, dyeService, count = 3) {
|
|
124
|
+
const allDyes = dyeService.getAllDyes();
|
|
125
|
+
const results = [];
|
|
126
|
+
for (const dye of allDyes) {
|
|
127
|
+
// Skip Facewear dyes (not usable for regular glamour)
|
|
128
|
+
if (dye.category === 'Facewear') {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const distance = this.calculateDistance(color.rgb, dye.rgb);
|
|
132
|
+
results.push({
|
|
133
|
+
characterColor: color,
|
|
134
|
+
dye,
|
|
135
|
+
distance,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
// Sort by distance and return top N
|
|
139
|
+
results.sort((a, b) => a.distance - b.distance);
|
|
140
|
+
return results.slice(0, count);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Find the single closest dye to a character color
|
|
144
|
+
*/
|
|
145
|
+
findClosestDye(color, dyeService) {
|
|
146
|
+
const matches = this.findClosestDyes(color, dyeService, 1);
|
|
147
|
+
return matches[0] || null;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Find all dyes within a color distance threshold
|
|
151
|
+
*/
|
|
152
|
+
findDyesWithinDistance(color, dyeService, maxDistance) {
|
|
153
|
+
const allDyes = dyeService.getAllDyes();
|
|
154
|
+
const results = [];
|
|
155
|
+
for (const dye of allDyes) {
|
|
156
|
+
if (dye.category === 'Facewear') {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
const distance = this.calculateDistance(color.rgb, dye.rgb);
|
|
160
|
+
if (distance <= maxDistance) {
|
|
161
|
+
results.push({
|
|
162
|
+
characterColor: color,
|
|
163
|
+
dye,
|
|
164
|
+
distance,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
results.sort((a, b) => a.distance - b.distance);
|
|
169
|
+
return results;
|
|
170
|
+
}
|
|
171
|
+
// ==========================================================================
|
|
172
|
+
// Color Lookup
|
|
173
|
+
// ==========================================================================
|
|
174
|
+
/**
|
|
175
|
+
* Get a specific color by index from a shared category
|
|
176
|
+
*/
|
|
177
|
+
getSharedColorByIndex(category, index) {
|
|
178
|
+
const colors = this.getSharedColors(category);
|
|
179
|
+
return colors.find((c) => c.index === index) || null;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Get a specific color by index from a race-specific category
|
|
183
|
+
*/
|
|
184
|
+
getRaceSpecificColorByIndex(category, subrace, gender, index) {
|
|
185
|
+
const colors = this.getRaceSpecificColors(category, subrace, gender);
|
|
186
|
+
return colors.find((c) => c.index === index) || null;
|
|
187
|
+
}
|
|
188
|
+
// ==========================================================================
|
|
189
|
+
// Metadata
|
|
190
|
+
// ==========================================================================
|
|
191
|
+
/**
|
|
192
|
+
* Get all available subraces
|
|
193
|
+
*/
|
|
194
|
+
getAvailableSubraces() {
|
|
195
|
+
const hairColors = this.data.raceSpecific.hairColors || {};
|
|
196
|
+
return Object.keys(hairColors);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Get the data version
|
|
200
|
+
*/
|
|
201
|
+
getVersion() {
|
|
202
|
+
return this.data.meta.version;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Get grid column count (always 8)
|
|
206
|
+
*/
|
|
207
|
+
getGridColumns() {
|
|
208
|
+
return this.data.meta.gridColumns;
|
|
209
|
+
}
|
|
210
|
+
// ==========================================================================
|
|
211
|
+
// Private Helpers
|
|
212
|
+
// ==========================================================================
|
|
213
|
+
/**
|
|
214
|
+
* Calculate Euclidean distance in RGB space
|
|
215
|
+
*/
|
|
216
|
+
calculateDistance(rgb1, rgb2) {
|
|
217
|
+
const dr = rgb1.r - rgb2.r;
|
|
218
|
+
const dg = rgb1.g - rgb2.g;
|
|
219
|
+
const db = rgb1.b - rgb2.b;
|
|
220
|
+
return Math.sqrt(dr * dr + dg * dg + db * db);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=CharacterColorService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CharacterColorService.js","sourceRoot":"","sources":["../../src/services/CharacterColorService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAaH,8BAA8B;AAC9B,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAkB/D;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAGhC;QACE,IAAI,CAAC,IAAI,GAAG,kBAAwC,CAAC;IACvD,CAAC;IAED,6EAA6E;IAC7E,gCAAgC;IAChC,6EAA6E;IAE7E;;OAEG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,IAAI,EAAE,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,sBAAsB;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,IAAI,EAAE,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,uBA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I,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAC3B,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAC3B,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IAChD,CAAC;CACF"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -33,6 +33,11 @@ export type { VisionType, Matrix3x3, ColorblindMatrices } from '@xivdyetools/typ
|
|
|
33
33
|
* @deprecated Removed in v2.0.0. Import directly from '@xivdyetools/types' instead.
|
|
34
34
|
*/
|
|
35
35
|
export type { Dye, LocalizedDye, DyeWithDistance, DyeDatabase } from '@xivdyetools/types';
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Removed in v2.0.0. Import directly from '@xivdyetools/types' instead.
|
|
38
|
+
*/
|
|
39
|
+
export type { CharacterColor, CharacterColorMatch, SharedColorCategory, RaceSpecificColorCategory, CharacterColorCategory, SubRace, Gender, Race, } from '@xivdyetools/types';
|
|
40
|
+
export { RACE_SUBRACES, SUBRACE_TO_RACE, COLOR_GRID_DIMENSIONS } from '@xivdyetools/types';
|
|
36
41
|
/**
|
|
37
42
|
* @deprecated Removed in v2.0.0. Import directly from '@xivdyetools/types' instead.
|
|
38
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,YAAY,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAMxE;;GAEG;AACH,YAAY,EAAE,GAAG,EAAE,GAAG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a,EACb,cAAc,EACd,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,6BAA6B,EAC7B,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,YAAY,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,4BAA4B,EAC5B,qBAAqB,EACrB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,YAAY,EACV,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,YAAY,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,MAAM,EACN,eAAe,EACf,UAAU,EACV,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACzD;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAClF;;GAEG;AACH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { NoOpLogger, ConsoleLogger } from '@xivdyetools/logger/library';
|
|
|
17
17
|
* @deprecated Removed in v2.0.0. Import directly from '@xivdyetools/types' instead.
|
|
18
18
|
*/
|
|
19
19
|
export { createHexColor, createDyeId, createHue, createSaturation } from '@xivdyetools/types';
|
|
20
|
+
export { RACE_SUBRACES, SUBRACE_TO_RACE, COLOR_GRID_DIMENSIONS } from '@xivdyetools/types';
|
|
20
21
|
/**
|
|
21
22
|
* @deprecated Removed in v2.0.0. Import directly from '@xivdyetools/types' instead.
|
|
22
23
|
*/
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAUxE;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAUxE;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAwB9F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AA2E3F;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAUzD;;GAEG;AACH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xivdyetools/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Core color algorithms and dye database for XIV Dye Tools",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@xivdyetools/logger": "^1.0.2",
|
|
80
|
-
"@xivdyetools/types": "^1.
|
|
80
|
+
"@xivdyetools/types": "^1.3.0"
|
|
81
81
|
},
|
|
82
82
|
"lint-staged": {
|
|
83
83
|
"*.ts": [
|