Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix theme color parsing with some web browsers

Chocobozzz33856ffa224e
diff --git a/client/src/app/core/theme/theme.service.ts b/client/src/app/core/theme/theme.service.ts
index bfd0fb25c5..afabadf18b 100644
--- a/client/src/app/core/theme/theme.service.ts
+++ b/client/src/app/core/theme/theme.service.ts
@@ -224,7 +224,8 @@ export class ThemeService {
continue
}
- const mainColorHSL = toHSLA(parse(mainColor))
+ // Use trim for some web browsers: https://github.com/Chocobozzz/PeerTube/issues/6952
+ const mainColorHSL = toHSLA(parse(mainColor.trim()))
debugLogger(`Theme main variable ${mainColor} -> ${this.toHSLStr(mainColorHSL)}`)
// Inject in alphabetical order for easy debug