LowContrastMode v1.5.1

After all these months, I finally did another LowContrastMode patch that can potentially fix and support the YouTube UI on v17.39.4 and above!
This commit is contained in:
arichornlover 2023-11-27 17:53:38 -06:00 committed by GitHub
parent f135505f1e
commit ea04a38b7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ static BOOL customContrastMode() {
UIColor *lcmHexColor;
%group gLowContrastMode // Low Contrast Mode v1.5.0 (Compatible with only YouTube v16.05.7-v17.38.10)
%group gLowContrastMode // Low Contrast Mode v1.5.1 (Compatible with only YouTube v16.05.7-v17.38.10)
%hook UIColor
+ (UIColor *)whiteColor { // Dark Theme Color
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
@ -184,6 +184,18 @@ UIColor *lcmHexColor;
%orig();
}
%end
%hook UIExtendedSRGBColorSpace
- (void)setTextColor:(UIColor *)textColor {
textColor = [[UIColor whiteColor] colorWithAlphaComponent:1.0];
%orig();
}
%end
%hook UIExtendedGrayColorSpace
- (void)setTextColor:(UIColor *)textColor {
textColor = [[UIColor whiteColor] colorWithAlphaComponent:1.0];
%orig();
}
%end
%hook VideoTitleLabel
- (void)setTextColor:(UIColor *)textColor {
textColor = [UIColor whiteColor];
@ -446,6 +458,18 @@ UIColor *lcmHexColor;
%orig();
}
%end
%hook UIExtendedSRGBColorSpace
- (void)setTextColor:(UIColor *)textColor {
textColor = [[UIColor whiteColor] colorWithAlphaComponent:1.0];
%orig();
}
%end
%hook UIExtendedGrayColorSpace
- (void)setTextColor:(UIColor *)textColor {
textColor = [[UIColor whiteColor] colorWithAlphaComponent:1.0];
%orig();
}
%end
%hook VideoTitleLabel
- (void)setTextColor:(UIColor *)textColor {
textColor = [UIColor whiteColor];