From e1d4228ae0eb8dcb5035b5c37670423161488a3a Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichorn@users.noreply.github.com> Date: Wed, 13 Dec 2023 02:34:21 -0600 Subject: [PATCH] Update LowContrastMode (1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If y’all are wondering. This is old code, I’m adding. Not sure if it will work here but hope it helps! --- Source/LowContrastMode.xm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/LowContrastMode.xm b/Source/LowContrastMode.xm index 52d2c94..6809208 100644 --- a/Source/LowContrastMode.xm +++ b/Source/LowContrastMode.xm @@ -171,6 +171,16 @@ UIColor *lcmHexColor; return [UIColor whiteColor]; } %end +%hook ELMTextNode +- (void)updateAttributedText { + %orig; + NSMutableDictionary *attributes = [[self.attributedText attributesAtIndex:0 effectiveRange:NULL] mutableCopy]; + attributes[NSForegroundColorAttributeName] = [UIColor whiteColor]; + NSMutableAttributedString *modifiedText = [[NSMutableAttributedString alloc] initWithAttributedString:self.attributedText]; + [modifiedText setAttributes:attributes range:NSMakeRange(0, modifiedText.length)]; + self.attributedText = modifiedText; +} +%end %hook YCHLiveChatLabel - (NSAttributedString *)attributedText { NSAttributedString *originalAttributedString = %orig;