-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the way stuff worked for YTCommonColorPalette. this is using a new branch because the previous branch was too cluttered.
- Loading branch information
1 parent
955f784
commit 744a4ac
Showing
3 changed files
with
67 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
TARGET := iphone:clang:latest:11.0 | ||
TARGET := iphone:clang:16.2:13.0 | ||
|
||
include $(THEOS)/makefiles/common.mk | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,112 @@ | ||
#import "Tweak.h" | ||
|
||
// Low Contrast Mode v1.1.0 | ||
%hook UIColor // Changes the whiteColor Method to be YouTube's old ui and also effects Icons & Text under Videos, Comment Section & Shorts caused by whiteColor (Deprecated by YouTube as of v17.40.5-Newer) | ||
+ (UIColor *)whiteColor { // Deprecated by YouTube | ||
// Low Contrast Mode v1.2.1 | ||
%hook UIColor | ||
+ (UIColor *)whiteColor { // Dark Theme Color | ||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; | ||
} | ||
+ (UIColor *)whiteColor2 { // Light Theme Color | ||
return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; | ||
} | ||
+ (UIColor *)textColor { | ||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; | ||
} | ||
+ (UIColor *)dynamicLabelColor { | ||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; | ||
} | ||
%end | ||
|
||
%hook YTColorPalette // Changes Texts & Icons in YouTube Bottom Bar + Text Icons under Video Player | ||
- (UIColor *)textPrimary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; // Dark Mode | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Mode | ||
return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Theme | ||
} | ||
- (UIColor *)textSecondary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
%end | ||
|
||
%hook YTCommonColorPalette // Changes Texts & Icons in YouTube Bottom Bar (Doesn't change Texts & Icons under the video player) | ||
- (UIColor *)textPrimary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; // Dark Mode | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; // Light Mode | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
- (UIColor *)textSecondary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor colorWithRed: 0.56 green: 0.56 blue: 0.56 alpha: 1.00]; | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
- (UIColor *)textPrimaryInverse { | ||
if (self.pageStyle == 1) { | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
- (UIColor *)overlayTextPrimary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
- (UIColor *)overlayTextSecondary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
- (UIColor *)overlayTextTertiary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
- (UIColor *)overlayButtonPrimary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor colorWithRed: 0.38 green: 0.38 blue: 0.38 alpha: 1.00]; | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
- (UIColor *)overlayButtonSecondary { | ||
if (self.pageStyle == 1) { | ||
return [UIColor whiteColor]; // Dark Theme | ||
} | ||
return [UIColor whiteColor2]; // Light Theme | ||
} | ||
%end | ||
|
||
%hook YTQTMButton // Changes Tweak Icons/Texts/Images | ||
- (UIColor *)sponsorBlockButton { | ||
- (UIColor *)whiteColor { | ||
return [UIColor whiteColor]; | ||
} | ||
%end | ||
|
||
%hook UIView // Changes some of the texts around the YouTube App. | ||
- (UIColor *)tintColor { | ||
- (UIColor *)whiteColor { | ||
return [UIColor whiteColor]; | ||
} | ||
%end | ||
|
||
%hook UIInterface // Chanbes some of the texts that uses UIInterface in the YouTube App. | ||
- (UIColor *)labelColor { | ||
return [UIColor whiteColor]; | ||
} | ||
- (UIColor *)secondaryLabelColor { | ||
%hook ELMAnimatedVectorView // Changes the Like Button Animation Color. | ||
- (UIColor *)_ASDisplayView { | ||
return [UIColor whiteColor]; | ||
} | ||
- (UIColor *)tertiaryLabelColor { | ||
return [UIColor whiteColor]; | ||
} | ||
- (UIColor *)quaternaryLabelColor { | ||
} | ||
- (UIColor *)ELMAnimatedVectorView { | ||
return [UIColor whiteColor]; | ||
} | ||
%end | ||
|
||
%hook ELMView // Changes the Texts in the Sub Menu | ||
- (void)didMoveToWindow { | ||
%orig; | ||
if (isDarkMode()) { | ||
self.subviews[0].tintColor = [UIColor whiteColor]; | ||
} | ||
} | ||
%end | ||
|
||
%hook _ASDisplayView | ||
- (void)didMoveToWindow { | ||
%orig; | ||
if (isDarkMode()) { | ||
if ([self.nextResponder isKindOfClass:%c(ASScrollView)]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"eml.cvr"]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"rich_header"]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.comment_cell"]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.ui.cancel.button"]) { self.superview.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.guidelines_text"]) { self.superview.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_bottom_sheet_container"]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.comment.channel_guidelines_entry_banner_container"]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.comment_composer"]) { self.tintColor = [UIColor whiteColor]; } | ||
if ([self.accessibilityIdentifier isEqualToString:@"id.elements.components.video_list_entry"]) { self.tintColor = [UIColor whiteColor]; } | ||
} | ||
%end | ||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters