-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@gw2api/types": patch | ||
--- | ||
|
||
Add types for `/v2/colors` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
export type Color = { | ||
/** The color id */ | ||
id: number; | ||
|
||
/** The name of this color */ | ||
name: string; | ||
|
||
/** The base RGB color */ | ||
base_rgb: [number, number, number]; | ||
|
||
/** Color categories */ | ||
categories: string[]; | ||
|
||
/** Appearance on cloth */ | ||
cloth: ColorMaterial; | ||
|
||
/** Appearance on fur */ | ||
fur?: ColorMaterial; | ||
|
||
/** Appearance on leather */ | ||
leather: ColorMaterial; | ||
|
||
/** Appearance on metal */ | ||
metal: ColorMaterial; | ||
|
||
/** Item id of the dye */ | ||
item?: number; | ||
}; | ||
|
||
type ColorMaterial = { | ||
/** Brightness of the color */ | ||
brightness: number; | ||
|
||
/** Contrast of the color */ | ||
contrast: number; | ||
|
||
/** HSL hue of the color */ | ||
hue: number; | ||
|
||
/** HSL lightness of the color */ | ||
lightness: number; | ||
|
||
/** HSL saturation of the color */ | ||
saturation: number; | ||
|
||
/** Precalculated RGB color */ | ||
rgb: [number, number, number]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters