LowContrastMode v1.4.2

This commit is contained in:
arichorn 2023-08-28 14:35:51 -05:00 committed by GitHub
parent afe0955072
commit bbf056a051
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,12 +35,12 @@ static BOOL pinkContrastMode() {
return IsEnabled(@"lowContrastMode_enabled") && colorContrastMode() == 8;
}
%group gLowContrastMode // Low Contrast Mode v1.4.1 (Compatible with only YouTube v16.05.7-v17.38.10)
%group gLowContrastMode // Low Contrast Mode v1.4.2 (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];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -88,6 +88,20 @@ static BOOL pinkContrastMode() {
return self.pageStyle == 1 ? [UIColor whiteColor] : %orig;
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];
@ -233,7 +247,7 @@ static BOOL pinkContrastMode() {
+ (UIColor *)whiteColor {
return [UIColor colorWithRed: 1.00 green: 0.31 blue: 0.27 alpha: 1.00];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 1.00 green: 0.31 blue: 0.27 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -308,6 +322,20 @@ static BOOL pinkContrastMode() {
return [UIColor colorWithRed: 0.84 green: 0.25 blue: 0.23 alpha: 1.00]; // Fallback Version
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];
@ -453,7 +481,7 @@ static BOOL pinkContrastMode() {
+ (UIColor *)whiteColor {
return [UIColor colorWithRed: 0.04 green: 0.47 blue: 0.72 alpha: 1.00];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 0.04 green: 0.47 blue: 0.72 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -528,6 +556,20 @@ static BOOL pinkContrastMode() {
return [UIColor colorWithRed: 0.04 green: 0.41 blue: 0.62 alpha: 1.00]; // Fallback Version
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];
@ -673,7 +715,7 @@ static BOOL pinkContrastMode() {
+ (UIColor *)whiteColor {
return [UIColor colorWithRed: 0.01 green: 0.66 blue: 0.18 alpha: 1.00];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 0.01 green: 0.66 blue: 0.18 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -749,6 +791,20 @@ static BOOL pinkContrastMode() {
return [UIColor colorWithRed: 0.00 green: 0.50 blue: 0.13 alpha: 1.00]; // Fallback Version
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];
@ -894,7 +950,7 @@ static BOOL pinkContrastMode() {
+ (UIColor *)whiteColor {
return [UIColor colorWithRed: 0.89 green: 0.82 blue: 0.20 alpha: 1.00];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 0.89 green: 0.82 blue: 0.20 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -969,6 +1025,20 @@ static BOOL pinkContrastMode() {
return [UIColor colorWithRed: 0.77 green: 0.71 blue: 0.14 alpha: 1.00]; // Fallback Version
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];
@ -1114,7 +1184,7 @@ static BOOL pinkContrastMode() {
+ (UIColor *)whiteColor {
return [UIColor colorWithRed: 0.73 green: 0.45 blue: 0.05 alpha: 1.00];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 0.73 green: 0.45 blue: 0.05 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -1189,6 +1259,20 @@ static BOOL pinkContrastMode() {
return [UIColor colorWithRed: 0.80 green: 0.49 blue: 0.05 alpha: 1.00]; // Fallback Version
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];
@ -1334,7 +1418,7 @@ static BOOL pinkContrastMode() {
+ (UIColor *)whiteColor {
return [UIColor colorWithRed: 0.42 green: 0.18 blue: 0.68 alpha: 1.00];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 0.42 green: 0.18 blue: 0.68 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -1409,6 +1493,20 @@ static BOOL pinkContrastMode() {
return [UIColor colorWithRed: 0.42 green: 0.05 blue: 0.68 alpha: 1.00]; // Fallback Version
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];
@ -1554,7 +1652,7 @@ static BOOL pinkContrastMode() {
+ (UIColor *)whiteColor {
return [UIColor colorWithRed: 0.50 green: 0.00 blue: 1.00 alpha: 1.00];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 0.50 green: 0.00 blue: 1.00 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -1629,6 +1727,20 @@ static BOOL pinkContrastMode() {
return [UIColor colorWithRed: 0.29 green: 0.00 blue: 0.51 alpha: 1.00]; // Fallback Version
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];
@ -1774,7 +1886,7 @@ static BOOL pinkContrastMode() {
+ (UIColor *)whiteColor {
return [UIColor colorWithRed: 0.74 green: 0.02 blue: 0.46 alpha: 1.00];
}
+ (UIColor *)darkTextColor {
+ (UIColor *)lightTextColor {
return [UIColor colorWithRed: 0.74 green: 0.02 blue: 0.46 alpha: 1.00];
}
+ (UIColor *)placeholderTextColor {
@ -1849,6 +1961,20 @@ static BOOL pinkContrastMode() {
return [UIColor colorWithRed: 0.81 green: 0.56 blue: 0.71 alpha: 1.00]; // Fallback Version
}
%end
%hook YTColor
- (UIColor *)white2 {
return [UIColor whiteColor];
}
- (UIColor *)white3 {
return [UIColor whiteColor];
}
- (UIColor *)white4 {
return [UIColor whiteColor];
}
- (UIColor *)white5 {
return [UIColor whiteColor];
}
%end
%hook QTMColorGroup
- (UIColor *)tint100 {
return [UIColor whiteColor];