Search: Omit files with unknown Chroma when using mono:true filter #2341
This commit is contained in:
parent
76e0725397
commit
8af69b81f2
19 changed files with 566 additions and 488 deletions
File diff suppressed because one or more lines are too long
|
@ -57,7 +57,7 @@ msgstr ""
|
|||
msgid "A click will copy it to your clipboard."
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:406
|
||||
#: src/component/navigation.vue:435
|
||||
#: src/component/navigation.vue:27
|
||||
#: src/pages/about/about.vue:4
|
||||
#: src/pages/about/about.vue:179
|
||||
|
@ -69,7 +69,7 @@ msgstr ""
|
|||
msgid "Abyss"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:73
|
||||
#: src/component/navigation.vue:70
|
||||
#: src/dialog/share/upload.vue:112
|
||||
#: src/model/account.js:98
|
||||
#: src/pages/settings.vue:74
|
||||
|
@ -171,12 +171,12 @@ msgstr ""
|
|||
msgid "Album Name"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:130
|
||||
#: src/app/routes.js:137
|
||||
#: src/component/navigation.vue:144
|
||||
#: src/component/navigation.vue:154
|
||||
#: src/app/routes.js:128
|
||||
#: src/app/routes.js:135
|
||||
#: src/component/navigation.vue:173
|
||||
#: src/component/navigation.vue:183
|
||||
#: src/component/navigation.vue:4
|
||||
#: src/component/navigation.vue:607
|
||||
#: src/component/navigation.vue:741
|
||||
#: src/share/albums.vue:4
|
||||
msgid "Albums"
|
||||
msgstr ""
|
||||
|
@ -264,7 +264,7 @@ msgstr ""
|
|||
msgid "An error occurred - are you offline?"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:98
|
||||
#: src/component/navigation.vue:127
|
||||
#: src/component/photo/cards.vue:228
|
||||
#: src/component/photo/cards.vue:544
|
||||
#: src/component/photo/list.vue:197
|
||||
|
@ -300,8 +300,8 @@ msgstr ""
|
|||
msgid "Approve"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:211
|
||||
#: src/component/navigation.vue:131
|
||||
#: src/app/routes.js:209
|
||||
#: src/component/navigation.vue:160
|
||||
#: src/component/photo/cards.vue:429
|
||||
#: src/component/photo/clipboard.vue:216
|
||||
#: src/pages/settings/general.vue:294
|
||||
|
@ -387,11 +387,6 @@ msgstr ""
|
|||
msgid "Brown"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:97
|
||||
#: src/app/routes.js:103
|
||||
msgid "Browse"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings/general.vue:383
|
||||
msgid "Browse and edit image classification labels."
|
||||
msgstr ""
|
||||
|
@ -408,10 +403,10 @@ msgstr ""
|
|||
msgid "Busy, please wait…"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:143
|
||||
#: src/app/routes.js:150
|
||||
#: src/component/navigation.vue:250
|
||||
#: src/component/navigation.vue:969
|
||||
#: src/app/routes.js:141
|
||||
#: src/app/routes.js:148
|
||||
#: src/component/navigation.vue:279
|
||||
#: src/component/navigation.vue:1103
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
|
@ -724,10 +719,10 @@ msgstr ""
|
|||
msgid "Disables reverse geocoding and maps."
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:376
|
||||
#: src/app/routes.js:383
|
||||
#: src/app/routes.js:390
|
||||
#: src/app/routes.js:397
|
||||
#: src/app/routes.js:374
|
||||
#: src/app/routes.js:381
|
||||
#: src/app/routes.js:388
|
||||
#: src/app/routes.js:395
|
||||
msgid "Discover"
|
||||
msgstr ""
|
||||
|
||||
|
@ -882,7 +877,8 @@ msgstr ""
|
|||
msgid "Enables RAW converter presets. May reduce performance."
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:373
|
||||
#: src/app/routes.js:254
|
||||
#: src/component/navigation.vue:402
|
||||
msgid "Errors"
|
||||
msgstr ""
|
||||
|
||||
|
@ -907,7 +903,7 @@ msgstr ""
|
|||
msgid "Exclude hidden"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:286
|
||||
#: src/component/navigation.vue:420
|
||||
msgid "Expand"
|
||||
msgstr ""
|
||||
|
||||
|
@ -965,9 +961,9 @@ msgstr ""
|
|||
msgid "Favorite"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:176
|
||||
#: src/component/navigation.vue:224
|
||||
#: src/component/navigation.vue:881
|
||||
#: src/app/routes.js:174
|
||||
#: src/component/navigation.vue:253
|
||||
#: src/component/navigation.vue:1015
|
||||
msgid "Favorites"
|
||||
msgstr ""
|
||||
|
||||
|
@ -975,7 +971,7 @@ msgstr ""
|
|||
msgid "Feature Request"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:414
|
||||
#: src/component/navigation.vue:443
|
||||
#: src/component/navigation.vue:35
|
||||
msgid "Feedback"
|
||||
msgstr ""
|
||||
|
@ -988,7 +984,7 @@ msgstr ""
|
|||
msgid "File"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:243
|
||||
#: src/app/routes.js:241
|
||||
msgid "File Browser"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1028,10 +1024,10 @@ msgstr ""
|
|||
msgid "Folder is empty"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:156
|
||||
#: src/app/routes.js:163
|
||||
#: src/component/navigation.vue:310
|
||||
#: src/component/navigation.vue:1177
|
||||
#: src/app/routes.js:154
|
||||
#: src/app/routes.js:161
|
||||
#: src/component/navigation.vue:339
|
||||
#: src/component/navigation.vue:1311
|
||||
msgid "Folders"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1096,11 +1092,18 @@ msgstr ""
|
|||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:364
|
||||
#: src/app/routes.js:58
|
||||
#: src/app/routes.js:64
|
||||
#: src/app/routes.js:70
|
||||
#: src/app/routes.js:76
|
||||
msgid "Help & Support"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:393
|
||||
msgid "Hidden"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:249
|
||||
#: src/app/routes.js:247
|
||||
msgid "Hidden Files"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1256,9 +1259,9 @@ msgstr ""
|
|||
msgid "Label"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:262
|
||||
#: src/component/navigation.vue:297
|
||||
#: src/component/navigation.vue:1132
|
||||
#: src/app/routes.js:260
|
||||
#: src/component/navigation.vue:326
|
||||
#: src/component/navigation.vue:1266
|
||||
#: src/dialog/photo/edit.vue:39
|
||||
#: src/dialog/photo/edit.vue:6
|
||||
#: src/dialog/photo/edit.vue:215
|
||||
|
@ -1295,19 +1298,19 @@ msgstr ""
|
|||
msgid "Lens"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:294
|
||||
#: src/app/routes.js:301
|
||||
#: src/app/routes.js:308
|
||||
#: src/component/navigation.vue:336
|
||||
#: src/component/navigation.vue:346
|
||||
#: src/app/routes.js:292
|
||||
#: src/app/routes.js:299
|
||||
#: src/app/routes.js:306
|
||||
#: src/component/navigation.vue:365
|
||||
#: src/component/navigation.vue:375
|
||||
#: src/component/navigation.vue:4
|
||||
#: src/component/navigation.vue:1269
|
||||
#: src/component/navigation.vue:1403
|
||||
#: src/pages/settings.vue:41
|
||||
#: src/pages/settings/general.vue:404
|
||||
msgid "Library"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:422
|
||||
#: src/component/navigation.vue:451
|
||||
#: src/component/navigation.vue:43
|
||||
#: src/dialog/photo/details.vue:544
|
||||
#: src/pages/about/license.vue:4
|
||||
|
@ -1339,8 +1342,8 @@ msgstr ""
|
|||
msgid "List"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:183
|
||||
#: src/component/navigation.vue:197
|
||||
#: src/app/routes.js:181
|
||||
#: src/component/navigation.vue:226
|
||||
#: src/component/photo/cards.vue:218
|
||||
#: src/component/photo/list.vue:187
|
||||
#: src/component/photo/mosaic.vue:191
|
||||
|
@ -1373,14 +1376,16 @@ msgstr ""
|
|||
msgid "Log messages appear here whenever PhotoPrism comes across broken files, or there are other potential issues."
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:436
|
||||
#: src/component/navigation.vue:1605
|
||||
#: src/component/navigation.vue:465
|
||||
#: src/component/navigation.vue:1739
|
||||
msgid "Login"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:483
|
||||
#: src/component/navigation.vue:1715
|
||||
#: src/component/navigation.vue:1746
|
||||
#: src/component/navigation.vue:36
|
||||
#: src/component/navigation.vue:512
|
||||
#: src/component/navigation.vue:34
|
||||
#: src/component/navigation.vue:1849
|
||||
#: src/component/navigation.vue:1880
|
||||
msgid "Logout"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1431,7 +1436,7 @@ msgstr ""
|
|||
msgid "Message sent"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:239
|
||||
#: src/component/navigation.vue:373
|
||||
msgid "Minimize"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1440,15 +1445,15 @@ msgstr ""
|
|||
msgid "Missing"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:117
|
||||
#: src/app/routes.js:124
|
||||
#: src/component/navigation.vue:237
|
||||
#: src/component/navigation.vue:924
|
||||
#: src/app/routes.js:115
|
||||
#: src/app/routes.js:122
|
||||
#: src/component/navigation.vue:266
|
||||
#: src/component/navigation.vue:1058
|
||||
#: src/pages/settings/general.vue:360
|
||||
msgid "Moments"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:82
|
||||
#: src/component/navigation.vue:111
|
||||
msgid "Monochrome"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1610,7 +1615,7 @@ msgstr ""
|
|||
msgid "No recently edited pictures"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings/sync.vue:48
|
||||
#: src/pages/settings/sync.vue:49
|
||||
msgid "No servers configured."
|
||||
msgstr ""
|
||||
|
||||
|
@ -1673,8 +1678,8 @@ msgstr ""
|
|||
msgid "Nothing to see here yet. Be patient."
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:452
|
||||
#: src/component/navigation.vue:1650
|
||||
#: src/component/navigation.vue:481
|
||||
#: src/component/navigation.vue:1784
|
||||
#: src/options/options.js:296
|
||||
msgid "Offline"
|
||||
msgstr ""
|
||||
|
@ -1757,7 +1762,7 @@ msgstr ""
|
|||
msgid "Original Name"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:355
|
||||
#: src/component/navigation.vue:384
|
||||
#: src/dialog/account/edit.vue:104
|
||||
#: src/model/file.js:194
|
||||
#: src/pages/library/files.vue:6
|
||||
|
@ -1781,7 +1786,7 @@ msgstr ""
|
|||
msgid "Panorama"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:90
|
||||
#: src/component/navigation.vue:119
|
||||
msgid "Panoramas"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1797,10 +1802,10 @@ msgstr ""
|
|||
msgid "Password changed"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:268
|
||||
#: src/app/routes.js:288
|
||||
#: src/component/navigation.vue:211
|
||||
#: src/component/navigation.vue:836
|
||||
#: src/app/routes.js:266
|
||||
#: src/app/routes.js:286
|
||||
#: src/component/navigation.vue:240
|
||||
#: src/component/navigation.vue:970
|
||||
#: src/dialog/photo/edit.vue:52
|
||||
#: src/dialog/photo/edit.vue:6
|
||||
#: src/dialog/photo/edit.vue:266
|
||||
|
@ -1828,7 +1833,7 @@ msgstr ""
|
|||
msgid "PhotoPrism has been updated…"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:110
|
||||
#: src/app/routes.js:108
|
||||
msgid "Photos"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1844,14 +1849,14 @@ msgstr ""
|
|||
msgid "Place & Time"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:218
|
||||
#: src/app/routes.js:224
|
||||
#: src/app/routes.js:230
|
||||
#: src/app/routes.js:237
|
||||
#: src/component/navigation.vue:263
|
||||
#: src/component/navigation.vue:273
|
||||
#: src/app/routes.js:216
|
||||
#: src/app/routes.js:222
|
||||
#: src/app/routes.js:228
|
||||
#: src/app/routes.js:235
|
||||
#: src/component/navigation.vue:292
|
||||
#: src/component/navigation.vue:302
|
||||
#: src/component/navigation.vue:4
|
||||
#: src/component/navigation.vue:1014
|
||||
#: src/component/navigation.vue:1148
|
||||
#: src/pages/settings/general.vue:108
|
||||
#: src/pages/settings/general.vue:450
|
||||
msgid "Places"
|
||||
|
@ -1911,9 +1916,9 @@ msgstr ""
|
|||
msgid "Primary"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:204
|
||||
#: src/component/navigation.vue:323
|
||||
#: src/component/navigation.vue:1222
|
||||
#: src/app/routes.js:202
|
||||
#: src/component/navigation.vue:352
|
||||
#: src/component/navigation.vue:1356
|
||||
#: src/dialog/photo/info.vue:102
|
||||
#: src/pages/settings/general.vue:272
|
||||
msgid "Private"
|
||||
|
@ -2065,8 +2070,8 @@ msgstr ""
|
|||
msgid "Retype Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:197
|
||||
#: src/component/navigation.vue:122
|
||||
#: src/app/routes.js:195
|
||||
#: src/component/navigation.vue:151
|
||||
msgid "Review"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2080,14 +2085,14 @@ msgstr ""
|
|||
msgid "Scan"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:114
|
||||
#: src/component/navigation.vue:143
|
||||
msgid "Scans"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:62
|
||||
#: src/component/navigation.vue:72
|
||||
#: src/component/navigation.vue:91
|
||||
#: src/component/navigation.vue:101
|
||||
#: src/component/navigation.vue:4
|
||||
#: src/component/navigation.vue:318
|
||||
#: src/component/navigation.vue:452
|
||||
#: src/component/photo/toolbar.vue:50
|
||||
#: src/pages/albums.vue:114
|
||||
#: src/pages/labels.vue:81
|
||||
|
@ -2151,17 +2156,17 @@ msgstr ""
|
|||
msgid "Service URL"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:316
|
||||
#: src/app/routes.js:328
|
||||
#: src/app/routes.js:340
|
||||
#: src/app/routes.js:352
|
||||
#: src/app/routes.js:364
|
||||
#: src/component/navigation.vue:387
|
||||
#: src/component/navigation.vue:397
|
||||
#: src/app/routes.js:314
|
||||
#: src/app/routes.js:326
|
||||
#: src/app/routes.js:338
|
||||
#: src/app/routes.js:350
|
||||
#: src/app/routes.js:362
|
||||
#: src/component/navigation.vue:416
|
||||
#: src/component/navigation.vue:426
|
||||
#: src/component/navigation.vue:8
|
||||
#: src/component/navigation.vue:18
|
||||
#: src/component/navigation.vue:4
|
||||
#: src/component/navigation.vue:1443
|
||||
#: src/component/navigation.vue:1577
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2293,7 +2298,7 @@ msgstr ""
|
|||
msgid "Stackable"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:106
|
||||
#: src/component/navigation.vue:135
|
||||
#: src/pages/settings/library.vue:34
|
||||
msgid "Stacks"
|
||||
msgstr ""
|
||||
|
@ -2310,7 +2315,7 @@ msgstr ""
|
|||
msgid "Start/Stop Slideshow"
|
||||
msgstr ""
|
||||
|
||||
#: src/component/navigation.vue:283
|
||||
#: src/component/navigation.vue:312
|
||||
msgid "States"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2503,8 +2508,8 @@ msgstr ""
|
|||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:169
|
||||
#: src/component/navigation.vue:164
|
||||
#: src/app/routes.js:167
|
||||
#: src/component/navigation.vue:193
|
||||
msgid "Unsorted"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2540,7 +2545,8 @@ msgid "Updating stacks"
|
|||
msgstr ""
|
||||
|
||||
#: src/component/album/toolbar.vue:176
|
||||
#: src/component/navigation.vue:136
|
||||
#: src/component/navigation.vue:25
|
||||
#: src/component/navigation.vue:23
|
||||
#: src/component/photo/toolbar.vue:128
|
||||
#: src/dialog/share/upload.vue:35
|
||||
#: src/dialog/upload.vue:8
|
||||
|
@ -2627,11 +2633,11 @@ msgstr ""
|
|||
msgid "Video"
|
||||
msgstr ""
|
||||
|
||||
#: src/app/routes.js:190
|
||||
#: src/component/navigation.vue:177
|
||||
#: src/component/navigation.vue:187
|
||||
#: src/app/routes.js:188
|
||||
#: src/component/navigation.vue:206
|
||||
#: src/component/navigation.vue:216
|
||||
#: src/component/navigation.vue:4
|
||||
#: src/component/navigation.vue:720
|
||||
#: src/component/navigation.vue:854
|
||||
msgid "Videos"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
"github.com/photoprism/photoprism/internal/migrate"
|
||||
"github.com/photoprism/photoprism/pkg/report"
|
||||
)
|
||||
|
||||
// MigrationsCommand registers the "migrations" CLI command.
|
||||
|
@ -23,6 +24,7 @@ var MigrationsCommand = cli.Command{
|
|||
Aliases: []string{"status", "show"},
|
||||
Usage: "Lists the status of schema migrations",
|
||||
ArgsUsage: "[migrations...]",
|
||||
Flags: report.CliFlags,
|
||||
Action: migrationsStatusAction,
|
||||
},
|
||||
{
|
||||
|
@ -73,10 +75,12 @@ func migrationsStatusAction(ctx *cli.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Display value names.
|
||||
fmt.Printf("%-17s %-9s %-21s %-21s %s\n", "ID", "Dialect", "Started At", "Finished At", "Status")
|
||||
// Report columns.
|
||||
cols := []string{"ID", "Dialect", "Started At", "Finished At", "Status"}
|
||||
|
||||
// Report rows.
|
||||
rows := make([][]string, 0, len(status))
|
||||
|
||||
// Show migrations.
|
||||
for _, m := range status {
|
||||
var started, finished, info string
|
||||
|
||||
|
@ -104,9 +108,18 @@ func migrationsStatusAction(ctx *cli.Context) error {
|
|||
info = "Running?"
|
||||
}
|
||||
|
||||
fmt.Printf("%-17s %-9s %-21s %-21s %s\n", m.ID, m.Dialect, started, finished, info)
|
||||
rows = append(rows, []string{m.ID, m.Dialect, started, finished, info})
|
||||
}
|
||||
|
||||
// Display report.
|
||||
info, err := report.Render(rows, cols, report.CliFormat(ctx))
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println(info)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -80,8 +80,8 @@ type File struct {
|
|||
FileMainColor string `gorm:"type:VARBINARY(16);index;" json:"MainColor" yaml:"MainColor,omitempty"`
|
||||
FileColors string `gorm:"type:VARBINARY(9);" json:"Colors" yaml:"Colors,omitempty"`
|
||||
FileLuminance string `gorm:"type:VARBINARY(9);" json:"Luminance" yaml:"Luminance,omitempty"`
|
||||
FileDiff uint32 `json:"Diff" yaml:"Diff,omitempty"`
|
||||
FileChroma uint8 `json:"Chroma" yaml:"Chroma,omitempty"`
|
||||
FileDiff int `json:"Diff" yaml:"Diff,omitempty"`
|
||||
FileChroma int8 `json:"Chroma" yaml:"Chroma,omitempty"`
|
||||
FileSoftware string `gorm:"type:VARCHAR(64)" json:"Software" yaml:"Software,omitempty"`
|
||||
FileError string `gorm:"type:VARBINARY(512)" json:"Error" yaml:"Error,omitempty"`
|
||||
ModTime int64 `json:"ModTime" yaml:"-"`
|
||||
|
@ -166,8 +166,8 @@ type FileInfos struct {
|
|||
FileMainColor string
|
||||
FileColors string
|
||||
FileLuminance string
|
||||
FileDiff uint32
|
||||
FileChroma uint8
|
||||
FileDiff int
|
||||
FileChroma int8
|
||||
}
|
||||
|
||||
// FirstFileByHash gets a file in db from its hash
|
||||
|
|
|
@ -40,8 +40,8 @@ func (m *File) MarshalJSON() ([]byte, error) {
|
|||
MainColor string `json:",omitempty"`
|
||||
Colors string `json:",omitempty"`
|
||||
Luminance string `json:",omitempty"`
|
||||
Diff uint32 `json:",omitempty"`
|
||||
Chroma uint8 `json:",omitempty"`
|
||||
Diff int `json:",omitempty"`
|
||||
Chroma int8 `json:",omitempty"`
|
||||
HDR bool `json:",omitempty"`
|
||||
Watermark bool `json:",omitempty"`
|
||||
Software string `json:",omitempty"`
|
||||
|
|
|
@ -85,7 +85,7 @@ type Photo struct {
|
|||
PhotoQuality int `gorm:"type:SMALLINT" json:"Quality" yaml:"Quality,omitempty"`
|
||||
PhotoFaces int `json:"Faces,omitempty" yaml:"Faces,omitempty"`
|
||||
PhotoResolution int `gorm:"type:SMALLINT" json:"Resolution" yaml:"-"`
|
||||
PhotoColor uint8 `json:"Color" yaml:"-"`
|
||||
PhotoColor int8 `json:"Color" yaml:"-"`
|
||||
CameraID uint `gorm:"index:idx_photos_camera_lens;default:1" json:"CameraID" yaml:"-"`
|
||||
CameraSerial string `gorm:"type:VARBINARY(160);" json:"CameraSerial" yaml:"CameraSerial,omitempty"`
|
||||
CameraSrc string `gorm:"type:VARBINARY(8);" json:"CameraSrc" yaml:"-"`
|
||||
|
|
|
@ -83,4 +83,19 @@ var DialectMySQL = Migrations{
|
|||
Dialect: "mysql",
|
||||
Statements: []string{"CREATE OR REPLACE INDEX idx_files_missing_root ON files (file_missing, file_root);"},
|
||||
},
|
||||
{
|
||||
ID: "20220521-000001",
|
||||
Dialect: "mysql",
|
||||
Statements: []string{"ALTER TABLE photos MODIFY photo_color SMALLINT DEFAULT -1;"},
|
||||
},
|
||||
{
|
||||
ID: "20220521-000002",
|
||||
Dialect: "mysql",
|
||||
Statements: []string{"ALTER TABLE files MODIFY file_diff INTEGER DEFAULT -1;"},
|
||||
},
|
||||
{
|
||||
ID: "20220521-000003",
|
||||
Dialect: "mysql",
|
||||
Statements: []string{"ALTER TABLE files MODIFY file_chroma SMALLINT DEFAULT -1;"},
|
||||
},
|
||||
}
|
||||
|
|
1
internal/migrate/mysql/20220521-000001.sql
Normal file
1
internal/migrate/mysql/20220521-000001.sql
Normal file
|
@ -0,0 +1 @@
|
|||
ALTER TABLE photos MODIFY photo_color SMALLINT DEFAULT -1;
|
1
internal/migrate/mysql/20220521-000002.sql
Normal file
1
internal/migrate/mysql/20220521-000002.sql
Normal file
|
@ -0,0 +1 @@
|
|||
ALTER TABLE files MODIFY file_diff INTEGER DEFAULT -1;
|
1
internal/migrate/mysql/20220521-000003.sql
Normal file
1
internal/migrate/mysql/20220521-000003.sql
Normal file
|
@ -0,0 +1 @@
|
|||
ALTER TABLE files MODIFY file_chroma SMALLINT DEFAULT -1;
|
|
@ -350,6 +350,10 @@ func (ind *Index) MediaFile(m *MediaFile, o IndexOptions, originalName, photoUID
|
|||
}
|
||||
}
|
||||
|
||||
// Reset file perceptive diff and chroma percent.
|
||||
file.FileDiff = -1
|
||||
file.FileChroma = -1
|
||||
|
||||
// Handle file types.
|
||||
switch {
|
||||
case m.IsJpeg():
|
||||
|
@ -363,10 +367,10 @@ func (ind *Index) MediaFile(m *MediaFile, o IndexOptions, originalName, photoUID
|
|||
file.FileColors = p.Colors.Hex()
|
||||
file.FileLuminance = p.Luminance.Hex()
|
||||
file.FileDiff = p.Luminance.Diff()
|
||||
file.FileChroma = p.Chroma.Value()
|
||||
file.FileChroma = p.Chroma.Percent()
|
||||
|
||||
if file.FilePrimary {
|
||||
photo.PhotoColor = p.MainColor.Uint8()
|
||||
photo.PhotoColor = p.MainColor.ID()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,9 +89,9 @@ type Photo struct {
|
|||
FileProjection string `json:"-" select:"files.file_projection"`
|
||||
FileAspectRatio float32 `json:"-" select:"files.file_aspect_ratio"`
|
||||
FileColors string `json:"-" select:"files.file_colors"`
|
||||
FileChroma uint8 `json:"-" select:"files.file_chroma"`
|
||||
FileDiff int `json:"-" select:"files.file_diff"`
|
||||
FileChroma int8 `json:"-" select:"files.file_chroma"`
|
||||
FileLuminance string `json:"-" select:"files.file_luminance"`
|
||||
FileDiff uint32 `json:"-" select:"files.file_diff"`
|
||||
Merged bool `json:"Merged" select:"-"`
|
||||
CreatedAt time.Time `json:"CreatedAt" select:"photos.created_at"`
|
||||
UpdatedAt time.Time `json:"UpdatedAt" select:"photos.updated_at"`
|
||||
|
|
32
pkg/colors/chroma.go
Normal file
32
pkg/colors/chroma.go
Normal file
|
@ -0,0 +1,32 @@
|
|||
package colors
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Chroma represents colorfulness.
|
||||
type Chroma int8
|
||||
|
||||
// Percent returns the colourfulness in percent.
|
||||
func (c Chroma) Percent() int8 {
|
||||
if c > 100 {
|
||||
return 100
|
||||
} else if c < 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
return int8(c)
|
||||
}
|
||||
|
||||
// Hex returns the colourfulness in percent has hex string.
|
||||
func (c Chroma) Hex() string {
|
||||
return fmt.Sprintf("%X", c.Percent())
|
||||
}
|
||||
|
||||
// Uint returns the colourfulness in percent as unsigned integer.
|
||||
func (c Chroma) Uint() uint {
|
||||
return uint(c.Percent())
|
||||
}
|
||||
|
||||
// Int returns the colourfulness in percent as integer.
|
||||
func (c Chroma) Int() int {
|
||||
return int(c.Percent())
|
||||
}
|
75
pkg/colors/chroma_test.go
Normal file
75
pkg/colors/chroma_test.go
Normal file
|
@ -0,0 +1,75 @@
|
|||
package colors
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestChroma_Percent(t *testing.T) {
|
||||
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
|
||||
lMap := LightMap(lum)
|
||||
|
||||
t.Run("chroma 15", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 15}
|
||||
assert.Equal(t, int8(15), perception.Chroma.Percent())
|
||||
})
|
||||
t.Run("chroma 127", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 127}
|
||||
assert.Equal(t, int8(100), perception.Chroma.Percent())
|
||||
})
|
||||
}
|
||||
|
||||
func TestChroma_Uint(t *testing.T) {
|
||||
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
|
||||
lMap := LightMap(lum)
|
||||
|
||||
t.Run("chroma 15", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 15}
|
||||
assert.Equal(t, uint(0xf), perception.Chroma.Uint())
|
||||
})
|
||||
t.Run("chroma 127", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 127}
|
||||
assert.Equal(t, uint(100), perception.Chroma.Uint())
|
||||
})
|
||||
}
|
||||
|
||||
func TestChroma_Int(t *testing.T) {
|
||||
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
|
||||
lMap := LightMap(lum)
|
||||
|
||||
t.Run("chroma 15", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 15}
|
||||
assert.Equal(t, 15, perception.Chroma.Int())
|
||||
})
|
||||
t.Run("chroma -1", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: -1}
|
||||
assert.Equal(t, 0, perception.Chroma.Int())
|
||||
})
|
||||
t.Run("chroma -127", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: -127}
|
||||
assert.Equal(t, 0, perception.Chroma.Int())
|
||||
})
|
||||
t.Run("chroma 100", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 100}
|
||||
assert.Equal(t, 100, perception.Chroma.Int())
|
||||
})
|
||||
t.Run("chroma 127", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 127}
|
||||
assert.Equal(t, 100, perception.Chroma.Int())
|
||||
})
|
||||
}
|
||||
|
||||
func TestChroma_Hex(t *testing.T) {
|
||||
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
|
||||
lMap := LightMap(lum)
|
||||
|
||||
t.Run("chroma 15", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 15}
|
||||
assert.Equal(t, "F", perception.Chroma.Hex())
|
||||
})
|
||||
t.Run("chroma 127", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 127}
|
||||
assert.Equal(t, "64", perception.Chroma.Hex())
|
||||
})
|
||||
}
|
|
@ -28,16 +28,13 @@ package colors
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"image/color"
|
||||
|
||||
"github.com/photoprism/photoprism/pkg/txt"
|
||||
)
|
||||
|
||||
type Color uint8
|
||||
type Color int8
|
||||
type Colors []Color
|
||||
|
||||
type Chroma uint8
|
||||
|
||||
const (
|
||||
Black Color = iota
|
||||
Grey
|
||||
|
@ -118,8 +115,8 @@ func (c Color) Name() string {
|
|||
return Names[c]
|
||||
}
|
||||
|
||||
func (c Color) Uint8() uint8 {
|
||||
return uint8(c)
|
||||
func (c Color) ID() int8 {
|
||||
return int8(c)
|
||||
}
|
||||
|
||||
func (c Color) Hex() string {
|
||||
|
@ -143,310 +140,3 @@ func (c Colors) List() []map[string]string {
|
|||
|
||||
return result
|
||||
}
|
||||
|
||||
func (c Chroma) Hex() string {
|
||||
return fmt.Sprintf("%X", c)
|
||||
}
|
||||
|
||||
func (c Chroma) Value() uint8 {
|
||||
return uint8(c)
|
||||
}
|
||||
|
||||
func (c Chroma) Uint() uint {
|
||||
return uint(c)
|
||||
}
|
||||
|
||||
func (c Chroma) Int() int {
|
||||
return int(c)
|
||||
}
|
||||
|
||||
var ColorExamples = map[Color]string{
|
||||
Black: "#212121",
|
||||
Grey: "#9E9E9E",
|
||||
Brown: "#A1887F",
|
||||
Gold: "#D4AF37",
|
||||
White: "#F5F5F5",
|
||||
Purple: "#AB47BC",
|
||||
Blue: "#2196F3",
|
||||
Cyan: "#00BCD4",
|
||||
Teal: "#009688",
|
||||
Green: "#66BB6A",
|
||||
Lime: "#CDDC39",
|
||||
Yellow: "#FDD835",
|
||||
Magenta: "#FF00FF",
|
||||
Orange: "#FFA726",
|
||||
Red: "#EF5350",
|
||||
Pink: "#EC407A",
|
||||
}
|
||||
|
||||
var ColorMap = map[color.RGBA]Color{
|
||||
{0x00, 0x00, 0x00, 0xff}: Black,
|
||||
{0xe0, 0xe0, 0xe0, 0xff}: Grey,
|
||||
{0x9E, 0x9E, 0x9E, 0xff}: Grey,
|
||||
{0x75, 0x75, 0x75, 0xff}: Grey,
|
||||
{0x61, 0x61, 0x61, 0xff}: Grey,
|
||||
{0x42, 0x42, 0x42, 0xff}: Grey,
|
||||
{0x84, 0x7a, 0x72, 0xff}: Grey,
|
||||
{0xdf, 0xe0, 0xe1, 0xff}: Grey,
|
||||
{0xb2, 0xb4, 0x9b, 0xff}: Grey,
|
||||
{0xa1, 0x88, 0x7f, 0xff}: Brown,
|
||||
{0x8d, 0x6e, 0x63, 0xff}: Brown,
|
||||
{0xa0, 0x7f, 0x6c, 0xff}: Brown,
|
||||
{0x9b, 0x7b, 0x5b, 0xff}: Brown,
|
||||
{0x75, 0x64, 0x5b, 0xff}: Brown,
|
||||
{0x79, 0x55, 0x48, 0xff}: Brown,
|
||||
{0x6d, 0x4c, 0x41, 0xff}: Brown,
|
||||
{0x5d, 0x40, 0x37, 0xff}: Brown,
|
||||
{0x9b, 0x61, 0x36, 0xff}: Brown,
|
||||
{0xc1, 0xa4, 0x87, 0xff}: Brown,
|
||||
{0xaa, 0x80, 0x62, 0xff}: Brown,
|
||||
{0x6b, 0x55, 0x46, 0xff}: Brown,
|
||||
{0xb4, 0xb5, 0x9c, 0xff}: Brown,
|
||||
{0xb4, 0x97, 0x6e, 0xff}: Brown,
|
||||
{0xed, 0xde, 0xac, 0xff}: Gold,
|
||||
{0xe8, 0xb4, 0x51, 0xff}: Gold,
|
||||
{0xc0, 0x8a, 0x3e, 0xff}: Gold,
|
||||
{0xa2, 0x7d, 0x4b, 0xff}: Gold,
|
||||
{0x75, 0x55, 0x31, 0xff}: Gold,
|
||||
{0xd1, 0x93, 0x27, 0xff}: Gold,
|
||||
{0xde, 0xa2, 0x53, 0xff}: Gold,
|
||||
{0xd5, 0xaa, 0x6f, 0xff}: Gold,
|
||||
{0xf5, 0xea, 0xd4, 0xff}: Gold,
|
||||
{0xFF, 0xFF, 0xFF, 0xff}: White,
|
||||
{0xe4, 0xe4, 0xe4, 0xff}: White,
|
||||
{0xe7, 0xe7, 0xe7, 0xff}: White,
|
||||
{0xf3, 0xe5, 0xf5, 0xff}: Purple,
|
||||
{0xe1, 0xbe, 0xe7, 0xff}: Purple,
|
||||
{0xce, 0x93, 0xd8, 0xff}: Purple,
|
||||
{0xba, 0x68, 0xc8, 0xff}: Purple,
|
||||
{0xab, 0x47, 0xbc, 0xff}: Purple,
|
||||
{0x9c, 0x27, 0xb0, 0xff}: Purple,
|
||||
{0x9b, 0x31, 0x8f, 0xff}: Purple,
|
||||
{0x86, 0x00, 0x7e, 0xff}: Purple,
|
||||
{0x8e, 0x24, 0xaa, 0xff}: Purple,
|
||||
{0x7b, 0x1f, 0xa2, 0xff}: Purple,
|
||||
{0x6a, 0x1b, 0x9a, 0xff}: Purple,
|
||||
{0x4a, 0x14, 0x8c, 0xff}: Purple,
|
||||
{0xaa, 0x00, 0xff, 0xff}: Purple,
|
||||
{0xed, 0xe7, 0xf6, 0xff}: Purple,
|
||||
{0xd1, 0xc4, 0xe9, 0xff}: Purple,
|
||||
{0xb3, 0x9d, 0xdb, 0xff}: Purple,
|
||||
{0x95, 0x75, 0xcd, 0xff}: Purple,
|
||||
{0x7e, 0x57, 0xc2, 0xff}: Purple,
|
||||
{0x5e, 0x35, 0xb1, 0xff}: Purple,
|
||||
{0x67, 0x3a, 0xb7, 0xff}: Purple,
|
||||
{0x51, 0x2d, 0xa8, 0xff}: Purple,
|
||||
{0x45, 0x27, 0xa0, 0xff}: Purple,
|
||||
{0x31, 0x1b, 0x92, 0xff}: Purple,
|
||||
{0xb3, 0x88, 0xff, 0xff}: Purple,
|
||||
{0x7c, 0x4d, 0xff, 0xff}: Purple,
|
||||
{0x8e, 0x64, 0x93, 0xff}: Purple,
|
||||
{0x5e, 0x3a, 0x5e, 0xff}: Purple,
|
||||
{0x44, 0x0e, 0x79, 0xff}: Purple,
|
||||
{0x48, 0x36, 0x78, 0xff}: Purple,
|
||||
{0x4e, 0x38, 0x80, 0xff}: Purple,
|
||||
{0x3b, 0x0e, 0x79, 0xff}: Purple,
|
||||
{0x3F, 0x51, 0xB5, 0xff}: Blue,
|
||||
{0xc5, 0xca, 0xe9, 0xff}: Blue,
|
||||
{0x5c, 0x6b, 0xc0, 0xff}: Blue,
|
||||
{0x39, 0x49, 0xab, 0xff}: Blue,
|
||||
{0x30, 0x3f, 0x9f, 0xff}: Blue,
|
||||
{0x28, 0x35, 0x93, 0xff}: Blue,
|
||||
{0x1a, 0x23, 0x7e, 0xff}: Blue,
|
||||
{0x53, 0x6d, 0xfe, 0xff}: Blue,
|
||||
{0x3d, 0x5a, 0xfe, 0xff}: Blue,
|
||||
{0x30, 0x4f, 0xfe, 0xff}: Blue,
|
||||
{0x21, 0x96, 0xF3, 0xff}: Blue,
|
||||
{0xbb, 0xde, 0xfb, 0xff}: Blue,
|
||||
{0x90, 0xca, 0xf9, 0xff}: Blue,
|
||||
{0x64, 0xb5, 0xf6, 0xff}: Blue,
|
||||
{0x42, 0xa5, 0xf5, 0xff}: Blue,
|
||||
{0x1e, 0x88, 0xe5, 0xff}: Blue,
|
||||
{0x19, 0x76, 0xd2, 0xff}: Blue,
|
||||
{0x15, 0x65, 0xc0, 0xff}: Blue,
|
||||
{0x0d, 0x47, 0xa1, 0xff}: Blue,
|
||||
{0x82, 0xb1, 0xff, 0xff}: Blue,
|
||||
{0x44, 0x8a, 0xff, 0xff}: Blue,
|
||||
{0x29, 0x79, 0xff, 0xff}: Blue,
|
||||
{0x29, 0x62, 0xff, 0xff}: Blue,
|
||||
{0x03, 0xa9, 0xf6, 0xff}: Blue,
|
||||
{0xb3, 0xe5, 0xfc, 0xff}: Blue,
|
||||
{0x81, 0xd4, 0xfa, 0xff}: Blue,
|
||||
{0x4f, 0xc3, 0xf7, 0xff}: Blue,
|
||||
{0x29, 0xb6, 0xf6, 0xff}: Blue,
|
||||
{0x03, 0x9b, 0xe5, 0xff}: Blue,
|
||||
{0x02, 0x88, 0xd1, 0xff}: Blue,
|
||||
{0x02, 0x77, 0xbd, 0xff}: Blue,
|
||||
{0x01, 0x57, 0x9b, 0xff}: Blue,
|
||||
{0x80, 0xd8, 0xff, 0xff}: Blue,
|
||||
{0x40, 0xc4, 0xff, 0xff}: Blue,
|
||||
{0x00, 0xb0, 0xff, 0xff}: Blue,
|
||||
{0x00, 0x91, 0xea, 0xff}: Blue,
|
||||
{0x60, 0x7d, 0x8b, 0xff}: Blue,
|
||||
{0x78, 0x90, 0x9c, 0xff}: Blue,
|
||||
{0x54, 0x6e, 0x7a, 0xff}: Blue,
|
||||
{0x37, 0x47, 0x4f, 0xff}: Blue,
|
||||
{0xe4, 0xeb, 0xfd, 0xff}: Blue,
|
||||
{0x7d, 0xd3, 0xea, 0xff}: Blue,
|
||||
{0x07, 0x63, 0x99, 0xff}: Blue,
|
||||
{0x28, 0x44, 0x6b, 0xff}: Blue,
|
||||
{0x4a, 0xc8, 0xf5, 0xff}: Blue,
|
||||
{0x08, 0x00, 0xf4, 0xff}: Blue,
|
||||
{0x01, 0x2d, 0x5f, 0xff}: Blue,
|
||||
{0xb2, 0xeb, 0xf2, 0xff}: Cyan,
|
||||
{0x80, 0xde, 0xea, 0xff}: Cyan,
|
||||
{0x4d, 0xd0, 0xe1, 0xff}: Cyan,
|
||||
{0x26, 0xc6, 0xda, 0xff}: Cyan,
|
||||
{0x00, 0xb8, 0xd4, 0xff}: Cyan,
|
||||
{0x00, 0xBC, 0xD4, 0xff}: Cyan,
|
||||
{0x00, 0xac, 0xc1, 0xff}: Cyan,
|
||||
{0x00, 0x97, 0xa7, 0xff}: Cyan,
|
||||
{0x00, 0x83, 0x8f, 0xff}: Cyan,
|
||||
{0x00, 0x60, 0x64, 0xff}: Cyan,
|
||||
{0x84, 0xff, 0xff, 0xff}: Cyan,
|
||||
{0x18, 0xff, 0xff, 0xff}: Cyan,
|
||||
{0x00, 0xe5, 0xff, 0xff}: Cyan,
|
||||
{0x00, 0x96, 0x88, 0xff}: Teal,
|
||||
{0x00, 0x89, 0x7b, 0xff}: Teal,
|
||||
{0x00, 0x79, 0x6b, 0xff}: Teal,
|
||||
{0x00, 0x69, 0x5c, 0xff}: Teal,
|
||||
{0x04, 0x5d, 0x5c, 0xff}: Teal,
|
||||
{0x24, 0x5a, 0x5f, 0xff}: Teal,
|
||||
{0x03, 0x45, 0x4f, 0xff}: Teal,
|
||||
{0x2c, 0x54, 0x5e, 0xff}: Teal,
|
||||
{0x17, 0x47, 0x41, 0xff}: Teal,
|
||||
{0xe8, 0xf5, 0xe9, 0xff}: Green,
|
||||
{0xc8, 0xe6, 0xc9, 0xff}: Green,
|
||||
{0xab, 0xc7, 0xb0, 0xff}: Green,
|
||||
{0xa5, 0xd6, 0xa7, 0xff}: Green,
|
||||
{0x81, 0xc7, 0x84, 0xff}: Green,
|
||||
{0x66, 0xbb, 0x6a, 0xff}: Green,
|
||||
{0x4C, 0xAF, 0x50, 0xff}: Green,
|
||||
{0x43, 0xa0, 0x47, 0xff}: Green,
|
||||
{0x38, 0x8e, 0x3c, 0xff}: Green,
|
||||
{0x2e, 0x7d, 0x32, 0xff}: Green,
|
||||
{0x1b, 0x5e, 0x20, 0xff}: Green,
|
||||
{0xf1, 0xf8, 0xe9, 0xff}: Green,
|
||||
{0xdc, 0xed, 0xc8, 0xff}: Green,
|
||||
{0xc5, 0xe1, 0xa5, 0xff}: Green,
|
||||
{0xae, 0xd5, 0x81, 0xff}: Green,
|
||||
{0x8b, 0xc3, 0x4a, 0xff}: Green,
|
||||
{0x9c, 0xcc, 0x65, 0xff}: Green,
|
||||
{0x7c, 0xb3, 0x42, 0xff}: Green,
|
||||
{0x68, 0x9f, 0x38, 0xff}: Green,
|
||||
{0x55, 0x8b, 0x2f, 0xff}: Green,
|
||||
{0x33, 0x69, 0x1e, 0xff}: Green,
|
||||
{0xb9, 0xf6, 0xca, 0xff}: Green,
|
||||
{0x69, 0xf0, 0xae, 0xff}: Green,
|
||||
{0x00, 0xc8, 0x53, 0xff}: Green,
|
||||
{0x00, 0xe6, 0x76, 0xff}: Green,
|
||||
{0xcc, 0xff, 0x90, 0xff}: Green,
|
||||
{0xb2, 0xff, 0x59, 0xff}: Green,
|
||||
{0x76, 0xff, 0x03, 0xff}: Green,
|
||||
{0x64, 0xdd, 0x17, 0xff}: Green,
|
||||
{0xdd, 0xd5, 0x79, 0xff}: Green,
|
||||
{0xee, 0xec, 0xa2, 0xff}: Green,
|
||||
{0x24, 0x4e, 0x3b, 0xff}: Green,
|
||||
{0x9a, 0x9d, 0x47, 0xff}: Green,
|
||||
{0xbe, 0xbd, 0x76, 0xff}: Green,
|
||||
{0x5c, 0x5a, 0x30, 0xff}: Green,
|
||||
{0xb3, 0xc1, 0x6c, 0xff}: Green,
|
||||
{0xac, 0xa7, 0x83, 0xff}: Green,
|
||||
{0x47, 0x4c, 0x25, 0xff}: Green,
|
||||
{0xcd, 0xd0, 0x87, 0xff}: Green,
|
||||
{0x79, 0x6d, 0x41, 0xff}: Green,
|
||||
{0xf0, 0xf4, 0xc3, 0xff}: Lime,
|
||||
{0xe6, 0xee, 0x9c, 0xff}: Lime,
|
||||
{0xdc, 0xe7, 0x75, 0xff}: Lime,
|
||||
{0xd4, 0xe1, 0x57, 0xff}: Lime,
|
||||
{0xCD, 0xDC, 0x39, 0xff}: Lime,
|
||||
{0xc0, 0xca, 0x33, 0xff}: Lime,
|
||||
{0xaf, 0xb4, 0x2b, 0xff}: Lime,
|
||||
{0xee, 0xff, 0x41, 0xff}: Lime,
|
||||
{0xc6, 0xff, 0x00, 0xff}: Lime,
|
||||
{0xae, 0xea, 0x00, 0xff}: Lime,
|
||||
{0xff, 0xf9, 0xc4, 0xff}: Yellow,
|
||||
{0xff, 0xf5, 0x9d, 0xff}: Yellow,
|
||||
{0xff, 0xf1, 0x76, 0xff}: Yellow,
|
||||
{0xff, 0xee, 0x58, 0xff}: Yellow,
|
||||
{0xff, 0xff, 0x8d, 0xff}: Yellow,
|
||||
{0xff, 0xff, 0x00, 0xff}: Yellow,
|
||||
{0xff, 0xd5, 0x4f, 0xff}: Yellow,
|
||||
{0xff, 0xca, 0x28, 0xff}: Yellow,
|
||||
{0xe3, 0xce, 0x81, 0xff}: Yellow,
|
||||
{0xd1, 0xaf, 0x52, 0xff}: Yellow,
|
||||
{0xee, 0xbb, 0x2b, 0xff}: Yellow,
|
||||
{0xd3, 0xa8, 0x3a, 0xff}: Yellow,
|
||||
{0xc5, 0xa7, 0x02, 0xff}: Yellow,
|
||||
{0x9f, 0x82, 0x01, 0xff}: Yellow,
|
||||
{0xe8, 0xce, 0x03, 0xff}: Yellow,
|
||||
{0xf9, 0xa8, 0x25, 0xff}: Orange,
|
||||
{0xFF, 0x98, 0x00, 0xff}: Orange,
|
||||
{0xff, 0xa7, 0x26, 0xff}: Orange,
|
||||
{0xfb, 0x8c, 0x00, 0xff}: Orange,
|
||||
{0xf5, 0x7c, 0x00, 0xff}: Orange,
|
||||
{0xef, 0x6c, 0x00, 0xff}: Orange,
|
||||
{0xff, 0x91, 0x00, 0xff}: Orange,
|
||||
{0xff, 0x6d, 0x00, 0xff}: Orange,
|
||||
{0xfd, 0x9a, 0x31, 0xff}: Orange,
|
||||
{0x7d, 0x27, 0x04, 0xff}: Orange,
|
||||
{0xfd, 0x57, 0x1f, 0xff}: Orange,
|
||||
{0xf8, 0x67, 0x04, 0xff}: Orange,
|
||||
{0xfd, 0x9a, 0x00, 0xff}: Orange,
|
||||
{0xfe, 0x8a, 0x00, 0xff}: Orange,
|
||||
{0xf1, 0x96, 0x52, 0xff}: Orange,
|
||||
{0xe5, 0x83, 0x47, 0xff}: Orange,
|
||||
{0xc9, 0x4c, 0x30, 0xff}: Orange,
|
||||
{0x9f, 0x56, 0x01, 0xff}: Orange,
|
||||
{0xfa, 0x68, 0x01, 0xff}: Orange,
|
||||
{0xbb, 0x72, 0x3d, 0xff}: Orange,
|
||||
{0xff, 0x52, 0x52, 0xff}: Red,
|
||||
{0xf4, 0x43, 0x36, 0xff}: Red,
|
||||
{0xef, 0x53, 0x50, 0xff}: Red,
|
||||
{0xe5, 0x39, 0x35, 0xff}: Red,
|
||||
{0xf6, 0x29, 0x2e, 0xff}: Red,
|
||||
{0xfc, 0x25, 0x2d, 0xff}: Red,
|
||||
{0xd3, 0x2f, 0x2f, 0xff}: Red,
|
||||
{0xc6, 0x28, 0x28, 0xff}: Red,
|
||||
{0xba, 0x28, 0x30, 0xff}: Red,
|
||||
{0xb7, 0x1c, 0x1c, 0xff}: Red,
|
||||
{0xd5, 0x00, 0x00, 0xff}: Red,
|
||||
{0xdb, 0x08, 0x06, 0xff}: Red,
|
||||
{0xcf, 0x09, 0x04, 0xff}: Red,
|
||||
{0xd8, 0x1a, 0x14, 0xff}: Red,
|
||||
{0xcc, 0x17, 0x08, 0xff}: Red,
|
||||
{0xd8, 0x0a, 0x07, 0xff}: Red,
|
||||
{0xde, 0x26, 0x16, 0xff}: Red,
|
||||
{0xee, 0x24, 0x0f, 0xff}: Red,
|
||||
{0xa1, 0x21, 0x1f, 0xff}: Red,
|
||||
{0x70, 0x12, 0x19, 0xff}: Red,
|
||||
{0x51, 0x12, 0x18, 0xff}: Red,
|
||||
{0x49, 0x11, 0x14, 0xff}: Red,
|
||||
{0xfc, 0xe4, 0xec, 0xff}: Pink,
|
||||
{0xfd, 0xc8, 0xeb, 0xff}: Pink,
|
||||
{0xe7, 0x9f, 0xa6, 0xff}: Pink,
|
||||
{0xf8, 0xbb, 0xd0, 0xff}: Pink,
|
||||
{0xf4, 0x8f, 0xb1, 0xff}: Pink,
|
||||
{0xff, 0x80, 0xab, 0xff}: Pink,
|
||||
{0xff, 0x40, 0x81, 0xff}: Pink,
|
||||
{0xf5, 0x00, 0x57, 0xff}: Pink,
|
||||
{0xf0, 0x62, 0x92, 0xff}: Pink,
|
||||
{0xec, 0x40, 0x7a, 0xff}: Pink,
|
||||
{0xe9, 0x1e, 0x63, 0xff}: Pink,
|
||||
{0xd8, 0x1b, 0x60, 0xff}: Pink,
|
||||
{0xc2, 0x18, 0x5b, 0xff}: Pink,
|
||||
{0xff, 0x00, 0xff, 0xff}: Magenta,
|
||||
{0xe5, 0x00, 0xe5, 0xff}: Magenta,
|
||||
{0xf0, 0x00, 0xb5, 0xff}: Magenta,
|
||||
{0xce, 0x00, 0x9b, 0xff}: Magenta,
|
||||
{0xc0, 0x05, 0x5b, 0xff}: Magenta,
|
||||
{0xb0, 0x00, 0x85, 0xff}: Magenta,
|
||||
{0xa8, 0x28, 0x63, 0xff}: Magenta,
|
||||
{0x5b, 0x00, 0x2f, 0xff}: Magenta,
|
||||
{0x4b, 0x01, 0x21, 0xff}: Magenta,
|
||||
{0x86, 0x02, 0x25, 0xff}: Magenta,
|
||||
{0xcb, 0x02, 0x3d, 0xff}: Magenta,
|
||||
{0x64, 0x07, 0x1a, 0xff}: Magenta,
|
||||
{0x9e, 0x00, 0x47, 0xff}: Magenta,
|
||||
{0xdc, 0x7a, 0xcf, 0xff}: Magenta,
|
||||
}
|
||||
|
|
|
@ -28,61 +28,6 @@ func TestColors_Hex(t *testing.T) {
|
|||
assert.Equal(t, "DA0", result)
|
||||
}
|
||||
|
||||
func TestChroma_Hex(t *testing.T) {
|
||||
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
|
||||
lMap := LightMap(lum)
|
||||
|
||||
t.Run("chroma 15", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 15}
|
||||
assert.Equal(t, "F", perception.Chroma.Hex())
|
||||
})
|
||||
t.Run("chroma 155", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 155}
|
||||
assert.Equal(t, "9B", perception.Chroma.Hex())
|
||||
})
|
||||
}
|
||||
func TestColor_Uint8(t *testing.T) {
|
||||
assert.Equal(t, uint8(7), Cyan.Uint8())
|
||||
}
|
||||
|
||||
func TestChroma_Value(t *testing.T) {
|
||||
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
|
||||
lMap := LightMap(lum)
|
||||
|
||||
t.Run("chroma 15", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 15}
|
||||
assert.Equal(t, uint8(0xf), perception.Chroma.Value())
|
||||
})
|
||||
t.Run("chroma 155", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 155}
|
||||
assert.Equal(t, uint8(0x9b), perception.Chroma.Value())
|
||||
})
|
||||
}
|
||||
|
||||
func TestChroma_Uint(t *testing.T) {
|
||||
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
|
||||
lMap := LightMap(lum)
|
||||
|
||||
t.Run("chroma 15", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 15}
|
||||
assert.Equal(t, uint(0xf), perception.Chroma.Uint())
|
||||
})
|
||||
t.Run("chroma 155", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 155}
|
||||
assert.Equal(t, uint(0x9b), perception.Chroma.Uint())
|
||||
})
|
||||
}
|
||||
|
||||
func TestChroma_Int(t *testing.T) {
|
||||
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
|
||||
lMap := LightMap(lum)
|
||||
|
||||
t.Run("chroma 15", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 15}
|
||||
assert.Equal(t, 15, perception.Chroma.Int())
|
||||
})
|
||||
t.Run("chroma 155", func(t *testing.T) {
|
||||
perception := ColorPerception{Colors: Colors{Orange, Lime, Cyan}, MainColor: Cyan, Luminance: lMap, Chroma: 155}
|
||||
assert.Equal(t, 155, perception.Chroma.Int())
|
||||
})
|
||||
assert.Equal(t, int8(7), Cyan.ID())
|
||||
}
|
||||
|
|
20
pkg/colors/examples.go
Normal file
20
pkg/colors/examples.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
package colors
|
||||
|
||||
var ColorExamples = map[Color]string{
|
||||
Black: "#212121",
|
||||
Grey: "#9E9E9E",
|
||||
Brown: "#A1887F",
|
||||
Gold: "#D4AF37",
|
||||
White: "#F5F5F5",
|
||||
Purple: "#AB47BC",
|
||||
Blue: "#2196F3",
|
||||
Cyan: "#00BCD4",
|
||||
Teal: "#009688",
|
||||
Green: "#66BB6A",
|
||||
Lime: "#CDDC39",
|
||||
Yellow: "#FDD835",
|
||||
Magenta: "#FF00FF",
|
||||
Orange: "#FFA726",
|
||||
Red: "#EF5350",
|
||||
Pink: "#EC407A",
|
||||
}
|
|
@ -57,7 +57,7 @@ var diffValues = []diffValue{
|
|||
*/
|
||||
|
||||
// Diff returns an integer that can be used to find similar images.
|
||||
func (m LightMap) Diff() (result uint32) {
|
||||
func (m LightMap) Diff() (result int) {
|
||||
if len(m) != 9 {
|
||||
return 0
|
||||
}
|
||||
|
|
275
pkg/colors/map.go
Normal file
275
pkg/colors/map.go
Normal file
|
@ -0,0 +1,275 @@
|
|||
package colors
|
||||
|
||||
import "image/color"
|
||||
|
||||
var ColorMap = map[color.RGBA]Color{
|
||||
{0x00, 0x00, 0x00, 0xff}: Black,
|
||||
{0xe0, 0xe0, 0xe0, 0xff}: Grey,
|
||||
{0x9E, 0x9E, 0x9E, 0xff}: Grey,
|
||||
{0x75, 0x75, 0x75, 0xff}: Grey,
|
||||
{0x61, 0x61, 0x61, 0xff}: Grey,
|
||||
{0x42, 0x42, 0x42, 0xff}: Grey,
|
||||
{0x84, 0x7a, 0x72, 0xff}: Grey,
|
||||
{0xdf, 0xe0, 0xe1, 0xff}: Grey,
|
||||
{0xb2, 0xb4, 0x9b, 0xff}: Grey,
|
||||
{0xa1, 0x88, 0x7f, 0xff}: Brown,
|
||||
{0x8d, 0x6e, 0x63, 0xff}: Brown,
|
||||
{0xa0, 0x7f, 0x6c, 0xff}: Brown,
|
||||
{0x9b, 0x7b, 0x5b, 0xff}: Brown,
|
||||
{0x75, 0x64, 0x5b, 0xff}: Brown,
|
||||
{0x79, 0x55, 0x48, 0xff}: Brown,
|
||||
{0x6d, 0x4c, 0x41, 0xff}: Brown,
|
||||
{0x5d, 0x40, 0x37, 0xff}: Brown,
|
||||
{0x9b, 0x61, 0x36, 0xff}: Brown,
|
||||
{0xc1, 0xa4, 0x87, 0xff}: Brown,
|
||||
{0xaa, 0x80, 0x62, 0xff}: Brown,
|
||||
{0x6b, 0x55, 0x46, 0xff}: Brown,
|
||||
{0xb4, 0xb5, 0x9c, 0xff}: Brown,
|
||||
{0xb4, 0x97, 0x6e, 0xff}: Brown,
|
||||
{0xed, 0xde, 0xac, 0xff}: Gold,
|
||||
{0xe8, 0xb4, 0x51, 0xff}: Gold,
|
||||
{0xc0, 0x8a, 0x3e, 0xff}: Gold,
|
||||
{0xa2, 0x7d, 0x4b, 0xff}: Gold,
|
||||
{0x75, 0x55, 0x31, 0xff}: Gold,
|
||||
{0xd1, 0x93, 0x27, 0xff}: Gold,
|
||||
{0xde, 0xa2, 0x53, 0xff}: Gold,
|
||||
{0xd5, 0xaa, 0x6f, 0xff}: Gold,
|
||||
{0xf5, 0xea, 0xd4, 0xff}: Gold,
|
||||
{0xFF, 0xFF, 0xFF, 0xff}: White,
|
||||
{0xe4, 0xe4, 0xe4, 0xff}: White,
|
||||
{0xe7, 0xe7, 0xe7, 0xff}: White,
|
||||
{0xf3, 0xe5, 0xf5, 0xff}: Purple,
|
||||
{0xe1, 0xbe, 0xe7, 0xff}: Purple,
|
||||
{0xce, 0x93, 0xd8, 0xff}: Purple,
|
||||
{0xba, 0x68, 0xc8, 0xff}: Purple,
|
||||
{0xab, 0x47, 0xbc, 0xff}: Purple,
|
||||
{0x9c, 0x27, 0xb0, 0xff}: Purple,
|
||||
{0x9b, 0x31, 0x8f, 0xff}: Purple,
|
||||
{0x86, 0x00, 0x7e, 0xff}: Purple,
|
||||
{0x8e, 0x24, 0xaa, 0xff}: Purple,
|
||||
{0x7b, 0x1f, 0xa2, 0xff}: Purple,
|
||||
{0x6a, 0x1b, 0x9a, 0xff}: Purple,
|
||||
{0x4a, 0x14, 0x8c, 0xff}: Purple,
|
||||
{0xaa, 0x00, 0xff, 0xff}: Purple,
|
||||
{0xed, 0xe7, 0xf6, 0xff}: Purple,
|
||||
{0xd1, 0xc4, 0xe9, 0xff}: Purple,
|
||||
{0xb3, 0x9d, 0xdb, 0xff}: Purple,
|
||||
{0x95, 0x75, 0xcd, 0xff}: Purple,
|
||||
{0x7e, 0x57, 0xc2, 0xff}: Purple,
|
||||
{0x5e, 0x35, 0xb1, 0xff}: Purple,
|
||||
{0x67, 0x3a, 0xb7, 0xff}: Purple,
|
||||
{0x51, 0x2d, 0xa8, 0xff}: Purple,
|
||||
{0x45, 0x27, 0xa0, 0xff}: Purple,
|
||||
{0x31, 0x1b, 0x92, 0xff}: Purple,
|
||||
{0xb3, 0x88, 0xff, 0xff}: Purple,
|
||||
{0x7c, 0x4d, 0xff, 0xff}: Purple,
|
||||
{0x8e, 0x64, 0x93, 0xff}: Purple,
|
||||
{0x5e, 0x3a, 0x5e, 0xff}: Purple,
|
||||
{0x44, 0x0e, 0x79, 0xff}: Purple,
|
||||
{0x48, 0x36, 0x78, 0xff}: Purple,
|
||||
{0x4e, 0x38, 0x80, 0xff}: Purple,
|
||||
{0x3b, 0x0e, 0x79, 0xff}: Purple,
|
||||
{0x3F, 0x51, 0xB5, 0xff}: Blue,
|
||||
{0xc5, 0xca, 0xe9, 0xff}: Blue,
|
||||
{0x5c, 0x6b, 0xc0, 0xff}: Blue,
|
||||
{0x39, 0x49, 0xab, 0xff}: Blue,
|
||||
{0x30, 0x3f, 0x9f, 0xff}: Blue,
|
||||
{0x28, 0x35, 0x93, 0xff}: Blue,
|
||||
{0x1a, 0x23, 0x7e, 0xff}: Blue,
|
||||
{0x53, 0x6d, 0xfe, 0xff}: Blue,
|
||||
{0x3d, 0x5a, 0xfe, 0xff}: Blue,
|
||||
{0x30, 0x4f, 0xfe, 0xff}: Blue,
|
||||
{0x21, 0x96, 0xF3, 0xff}: Blue,
|
||||
{0xbb, 0xde, 0xfb, 0xff}: Blue,
|
||||
{0x90, 0xca, 0xf9, 0xff}: Blue,
|
||||
{0x64, 0xb5, 0xf6, 0xff}: Blue,
|
||||
{0x42, 0xa5, 0xf5, 0xff}: Blue,
|
||||
{0x1e, 0x88, 0xe5, 0xff}: Blue,
|
||||
{0x19, 0x76, 0xd2, 0xff}: Blue,
|
||||
{0x15, 0x65, 0xc0, 0xff}: Blue,
|
||||
{0x0d, 0x47, 0xa1, 0xff}: Blue,
|
||||
{0x82, 0xb1, 0xff, 0xff}: Blue,
|
||||
{0x44, 0x8a, 0xff, 0xff}: Blue,
|
||||
{0x29, 0x79, 0xff, 0xff}: Blue,
|
||||
{0x29, 0x62, 0xff, 0xff}: Blue,
|
||||
{0x03, 0xa9, 0xf6, 0xff}: Blue,
|
||||
{0xb3, 0xe5, 0xfc, 0xff}: Blue,
|
||||
{0x81, 0xd4, 0xfa, 0xff}: Blue,
|
||||
{0x4f, 0xc3, 0xf7, 0xff}: Blue,
|
||||
{0x29, 0xb6, 0xf6, 0xff}: Blue,
|
||||
{0x03, 0x9b, 0xe5, 0xff}: Blue,
|
||||
{0x02, 0x88, 0xd1, 0xff}: Blue,
|
||||
{0x02, 0x77, 0xbd, 0xff}: Blue,
|
||||
{0x01, 0x57, 0x9b, 0xff}: Blue,
|
||||
{0x80, 0xd8, 0xff, 0xff}: Blue,
|
||||
{0x40, 0xc4, 0xff, 0xff}: Blue,
|
||||
{0x00, 0xb0, 0xff, 0xff}: Blue,
|
||||
{0x00, 0x91, 0xea, 0xff}: Blue,
|
||||
{0x60, 0x7d, 0x8b, 0xff}: Blue,
|
||||
{0x78, 0x90, 0x9c, 0xff}: Blue,
|
||||
{0x54, 0x6e, 0x7a, 0xff}: Blue,
|
||||
{0x37, 0x47, 0x4f, 0xff}: Blue,
|
||||
{0xe4, 0xeb, 0xfd, 0xff}: Blue,
|
||||
{0x7d, 0xd3, 0xea, 0xff}: Blue,
|
||||
{0x07, 0x63, 0x99, 0xff}: Blue,
|
||||
{0x28, 0x44, 0x6b, 0xff}: Blue,
|
||||
{0x4a, 0xc8, 0xf5, 0xff}: Blue,
|
||||
{0x08, 0x00, 0xf4, 0xff}: Blue,
|
||||
{0x01, 0x2d, 0x5f, 0xff}: Blue,
|
||||
{0xb2, 0xeb, 0xf2, 0xff}: Cyan,
|
||||
{0x80, 0xde, 0xea, 0xff}: Cyan,
|
||||
{0x4d, 0xd0, 0xe1, 0xff}: Cyan,
|
||||
{0x26, 0xc6, 0xda, 0xff}: Cyan,
|
||||
{0x00, 0xb8, 0xd4, 0xff}: Cyan,
|
||||
{0x00, 0xBC, 0xD4, 0xff}: Cyan,
|
||||
{0x00, 0xac, 0xc1, 0xff}: Cyan,
|
||||
{0x00, 0x97, 0xa7, 0xff}: Cyan,
|
||||
{0x00, 0x83, 0x8f, 0xff}: Cyan,
|
||||
{0x00, 0x60, 0x64, 0xff}: Cyan,
|
||||
{0x84, 0xff, 0xff, 0xff}: Cyan,
|
||||
{0x18, 0xff, 0xff, 0xff}: Cyan,
|
||||
{0x00, 0xe5, 0xff, 0xff}: Cyan,
|
||||
{0x00, 0x96, 0x88, 0xff}: Teal,
|
||||
{0x00, 0x89, 0x7b, 0xff}: Teal,
|
||||
{0x00, 0x79, 0x6b, 0xff}: Teal,
|
||||
{0x00, 0x69, 0x5c, 0xff}: Teal,
|
||||
{0x04, 0x5d, 0x5c, 0xff}: Teal,
|
||||
{0x24, 0x5a, 0x5f, 0xff}: Teal,
|
||||
{0x03, 0x45, 0x4f, 0xff}: Teal,
|
||||
{0x2c, 0x54, 0x5e, 0xff}: Teal,
|
||||
{0x17, 0x47, 0x41, 0xff}: Teal,
|
||||
{0xe8, 0xf5, 0xe9, 0xff}: Green,
|
||||
{0xc8, 0xe6, 0xc9, 0xff}: Green,
|
||||
{0xab, 0xc7, 0xb0, 0xff}: Green,
|
||||
{0xa5, 0xd6, 0xa7, 0xff}: Green,
|
||||
{0x81, 0xc7, 0x84, 0xff}: Green,
|
||||
{0x66, 0xbb, 0x6a, 0xff}: Green,
|
||||
{0x4C, 0xAF, 0x50, 0xff}: Green,
|
||||
{0x43, 0xa0, 0x47, 0xff}: Green,
|
||||
{0x38, 0x8e, 0x3c, 0xff}: Green,
|
||||
{0x2e, 0x7d, 0x32, 0xff}: Green,
|
||||
{0x1b, 0x5e, 0x20, 0xff}: Green,
|
||||
{0xf1, 0xf8, 0xe9, 0xff}: Green,
|
||||
{0xdc, 0xed, 0xc8, 0xff}: Green,
|
||||
{0xc5, 0xe1, 0xa5, 0xff}: Green,
|
||||
{0xae, 0xd5, 0x81, 0xff}: Green,
|
||||
{0x8b, 0xc3, 0x4a, 0xff}: Green,
|
||||
{0x9c, 0xcc, 0x65, 0xff}: Green,
|
||||
{0x7c, 0xb3, 0x42, 0xff}: Green,
|
||||
{0x68, 0x9f, 0x38, 0xff}: Green,
|
||||
{0x55, 0x8b, 0x2f, 0xff}: Green,
|
||||
{0x33, 0x69, 0x1e, 0xff}: Green,
|
||||
{0xb9, 0xf6, 0xca, 0xff}: Green,
|
||||
{0x69, 0xf0, 0xae, 0xff}: Green,
|
||||
{0x00, 0xc8, 0x53, 0xff}: Green,
|
||||
{0x00, 0xe6, 0x76, 0xff}: Green,
|
||||
{0xcc, 0xff, 0x90, 0xff}: Green,
|
||||
{0xb2, 0xff, 0x59, 0xff}: Green,
|
||||
{0x76, 0xff, 0x03, 0xff}: Green,
|
||||
{0x64, 0xdd, 0x17, 0xff}: Green,
|
||||
{0xdd, 0xd5, 0x79, 0xff}: Green,
|
||||
{0xee, 0xec, 0xa2, 0xff}: Green,
|
||||
{0x24, 0x4e, 0x3b, 0xff}: Green,
|
||||
{0x9a, 0x9d, 0x47, 0xff}: Green,
|
||||
{0xbe, 0xbd, 0x76, 0xff}: Green,
|
||||
{0x5c, 0x5a, 0x30, 0xff}: Green,
|
||||
{0xb3, 0xc1, 0x6c, 0xff}: Green,
|
||||
{0xac, 0xa7, 0x83, 0xff}: Green,
|
||||
{0x47, 0x4c, 0x25, 0xff}: Green,
|
||||
{0xcd, 0xd0, 0x87, 0xff}: Green,
|
||||
{0x79, 0x6d, 0x41, 0xff}: Green,
|
||||
{0xf0, 0xf4, 0xc3, 0xff}: Lime,
|
||||
{0xe6, 0xee, 0x9c, 0xff}: Lime,
|
||||
{0xdc, 0xe7, 0x75, 0xff}: Lime,
|
||||
{0xd4, 0xe1, 0x57, 0xff}: Lime,
|
||||
{0xCD, 0xDC, 0x39, 0xff}: Lime,
|
||||
{0xc0, 0xca, 0x33, 0xff}: Lime,
|
||||
{0xaf, 0xb4, 0x2b, 0xff}: Lime,
|
||||
{0xee, 0xff, 0x41, 0xff}: Lime,
|
||||
{0xc6, 0xff, 0x00, 0xff}: Lime,
|
||||
{0xae, 0xea, 0x00, 0xff}: Lime,
|
||||
{0xff, 0xf9, 0xc4, 0xff}: Yellow,
|
||||
{0xff, 0xf5, 0x9d, 0xff}: Yellow,
|
||||
{0xff, 0xf1, 0x76, 0xff}: Yellow,
|
||||
{0xff, 0xee, 0x58, 0xff}: Yellow,
|
||||
{0xff, 0xff, 0x8d, 0xff}: Yellow,
|
||||
{0xff, 0xff, 0x00, 0xff}: Yellow,
|
||||
{0xff, 0xd5, 0x4f, 0xff}: Yellow,
|
||||
{0xff, 0xca, 0x28, 0xff}: Yellow,
|
||||
{0xe3, 0xce, 0x81, 0xff}: Yellow,
|
||||
{0xd1, 0xaf, 0x52, 0xff}: Yellow,
|
||||
{0xee, 0xbb, 0x2b, 0xff}: Yellow,
|
||||
{0xd3, 0xa8, 0x3a, 0xff}: Yellow,
|
||||
{0xc5, 0xa7, 0x02, 0xff}: Yellow,
|
||||
{0x9f, 0x82, 0x01, 0xff}: Yellow,
|
||||
{0xe8, 0xce, 0x03, 0xff}: Yellow,
|
||||
{0xf9, 0xa8, 0x25, 0xff}: Orange,
|
||||
{0xFF, 0x98, 0x00, 0xff}: Orange,
|
||||
{0xff, 0xa7, 0x26, 0xff}: Orange,
|
||||
{0xfb, 0x8c, 0x00, 0xff}: Orange,
|
||||
{0xf5, 0x7c, 0x00, 0xff}: Orange,
|
||||
{0xef, 0x6c, 0x00, 0xff}: Orange,
|
||||
{0xff, 0x91, 0x00, 0xff}: Orange,
|
||||
{0xff, 0x6d, 0x00, 0xff}: Orange,
|
||||
{0xfd, 0x9a, 0x31, 0xff}: Orange,
|
||||
{0x7d, 0x27, 0x04, 0xff}: Orange,
|
||||
{0xfd, 0x57, 0x1f, 0xff}: Orange,
|
||||
{0xf8, 0x67, 0x04, 0xff}: Orange,
|
||||
{0xfd, 0x9a, 0x00, 0xff}: Orange,
|
||||
{0xfe, 0x8a, 0x00, 0xff}: Orange,
|
||||
{0xf1, 0x96, 0x52, 0xff}: Orange,
|
||||
{0xe5, 0x83, 0x47, 0xff}: Orange,
|
||||
{0xc9, 0x4c, 0x30, 0xff}: Orange,
|
||||
{0x9f, 0x56, 0x01, 0xff}: Orange,
|
||||
{0xfa, 0x68, 0x01, 0xff}: Orange,
|
||||
{0xbb, 0x72, 0x3d, 0xff}: Orange,
|
||||
{0xff, 0x52, 0x52, 0xff}: Red,
|
||||
{0xf4, 0x43, 0x36, 0xff}: Red,
|
||||
{0xef, 0x53, 0x50, 0xff}: Red,
|
||||
{0xe5, 0x39, 0x35, 0xff}: Red,
|
||||
{0xf6, 0x29, 0x2e, 0xff}: Red,
|
||||
{0xfc, 0x25, 0x2d, 0xff}: Red,
|
||||
{0xd3, 0x2f, 0x2f, 0xff}: Red,
|
||||
{0xc6, 0x28, 0x28, 0xff}: Red,
|
||||
{0xba, 0x28, 0x30, 0xff}: Red,
|
||||
{0xb7, 0x1c, 0x1c, 0xff}: Red,
|
||||
{0xd5, 0x00, 0x00, 0xff}: Red,
|
||||
{0xdb, 0x08, 0x06, 0xff}: Red,
|
||||
{0xcf, 0x09, 0x04, 0xff}: Red,
|
||||
{0xd8, 0x1a, 0x14, 0xff}: Red,
|
||||
{0xcc, 0x17, 0x08, 0xff}: Red,
|
||||
{0xd8, 0x0a, 0x07, 0xff}: Red,
|
||||
{0xde, 0x26, 0x16, 0xff}: Red,
|
||||
{0xee, 0x24, 0x0f, 0xff}: Red,
|
||||
{0xa1, 0x21, 0x1f, 0xff}: Red,
|
||||
{0x70, 0x12, 0x19, 0xff}: Red,
|
||||
{0x51, 0x12, 0x18, 0xff}: Red,
|
||||
{0x49, 0x11, 0x14, 0xff}: Red,
|
||||
{0xfc, 0xe4, 0xec, 0xff}: Pink,
|
||||
{0xfd, 0xc8, 0xeb, 0xff}: Pink,
|
||||
{0xe7, 0x9f, 0xa6, 0xff}: Pink,
|
||||
{0xf8, 0xbb, 0xd0, 0xff}: Pink,
|
||||
{0xf4, 0x8f, 0xb1, 0xff}: Pink,
|
||||
{0xff, 0x80, 0xab, 0xff}: Pink,
|
||||
{0xff, 0x40, 0x81, 0xff}: Pink,
|
||||
{0xf5, 0x00, 0x57, 0xff}: Pink,
|
||||
{0xf0, 0x62, 0x92, 0xff}: Pink,
|
||||
{0xec, 0x40, 0x7a, 0xff}: Pink,
|
||||
{0xe9, 0x1e, 0x63, 0xff}: Pink,
|
||||
{0xd8, 0x1b, 0x60, 0xff}: Pink,
|
||||
{0xc2, 0x18, 0x5b, 0xff}: Pink,
|
||||
{0xff, 0x00, 0xff, 0xff}: Magenta,
|
||||
{0xe5, 0x00, 0xe5, 0xff}: Magenta,
|
||||
{0xf0, 0x00, 0xb5, 0xff}: Magenta,
|
||||
{0xce, 0x00, 0x9b, 0xff}: Magenta,
|
||||
{0xc0, 0x05, 0x5b, 0xff}: Magenta,
|
||||
{0xb0, 0x00, 0x85, 0xff}: Magenta,
|
||||
{0xa8, 0x28, 0x63, 0xff}: Magenta,
|
||||
{0x5b, 0x00, 0x2f, 0xff}: Magenta,
|
||||
{0x4b, 0x01, 0x21, 0xff}: Magenta,
|
||||
{0x86, 0x02, 0x25, 0xff}: Magenta,
|
||||
{0xcb, 0x02, 0x3d, 0xff}: Magenta,
|
||||
{0x64, 0x07, 0x1a, 0xff}: Magenta,
|
||||
{0x9e, 0x00, 0x47, 0xff}: Magenta,
|
||||
{0xdc, 0x7a, 0xcf, 0xff}: Magenta,
|
||||
}
|
Loading…
Reference in a new issue