aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/config.ts
diff options
context:
space:
mode:
authorAjay <[email protected]>2022-02-05 22:23:11 -0500
committerAjay <[email protected]>2022-02-05 22:23:11 -0500
commite8307a2af7af23a55351c096bb40cb382308da80 (patch)
tree2c122da86b44f4e89d7de2a853ce376b446fc908 /src/config.ts
parent0ac4ef7a4bd276660cfecb1066f63937537113d4 (diff)
downloadSponsorBlock-e8307a2af7af23a55351c096bb40cb382308da80.tar.gz
SponsorBlock-e8307a2af7af23a55351c096bb40cb382308da80.zip
Add text color based off luminance for full video label
Diffstat (limited to 'src/config.ts')
-rw-r--r--src/config.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.ts b/src/config.ts
index a890f94a..63dd6af0 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -54,6 +54,14 @@ interface SBConfig {
categoryPillUpdate: boolean,
darkMode: boolean,
+ // Used to cache calculated text color info
+ categoryPillColors: {
+ [key in Category]: {
+ lastColor: string,
+ textColor: string
+ }
+ }
+
skipKeybind: Keybind,
startSponsorKeybind: Keybind,
submitKeybind: Keybind,
@@ -210,6 +218,8 @@ const Config: SBObject = {
categoryPillUpdate: false,
darkMode: true,
+ categoryPillColors: {},
+
/**
* Default keybinds should not set "code" as that's gonna be different based on the user's locale. They should also only use EITHER ctrl OR alt modifiers (or none).
* Using ctrl+alt, or shift may produce a different character that we will not be able to recognize in different locales.