chore: Initial clean commit
- Removed YuMi/Library/ (138 MB, not tracked) - Removed YuMi/Resources/ (23 MB, not tracked) - Removed old version assets (566 files, not tracked) - Excluded Pods/, xcuserdata/ and other build artifacts - Clean repository optimized for company server deployment
This commit is contained in:
177
YuMi/CustomUI/DJDKMIMOMColor.m
Normal file
177
YuMi/CustomUI/DJDKMIMOMColor.m
Normal file
@@ -0,0 +1,177 @@
|
||||
//
|
||||
// DJDKMIMOMColor.m
|
||||
// YUMI
|
||||
//
|
||||
// Created by YUMI on 2021/9/9.
|
||||
//
|
||||
|
||||
#import "DJDKMIMOMColor.h"
|
||||
|
||||
@implementation DJDKMIMOMColor
|
||||
/// 主题色0x9682FF
|
||||
+ (UIColor *)appMainColor {
|
||||
return UIColorFromRGB(0x9682FF);
|
||||
}
|
||||
|
||||
///强调色 #248CFE
|
||||
+ (UIColor *)appEmphasizeColor {
|
||||
return UIColorFromRGB(0x248CFE);
|
||||
}
|
||||
|
||||
///强调色1 0xBF36FF
|
||||
+ (UIColor *)appEmphasizeColor1 {
|
||||
return UIColorFromRGB(0xBF36FF);
|
||||
}
|
||||
|
||||
///强调色2 0xFB486A
|
||||
+ (UIColor *)appEmphasizeColor2 {
|
||||
return UIColorFromRGB(0xFB486A);
|
||||
}
|
||||
|
||||
/* ------页面相关颜色 START------ */
|
||||
/// view的背景色 0xF3F5FA
|
||||
+ (UIColor *)appBackgroundColor {
|
||||
return UIColorFromRGB(0xF3F5FA);
|
||||
}
|
||||
/// cell的背景色 0xFFFFFF
|
||||
+ (UIColor *)appCellBackgroundColor {
|
||||
return UIColorFromRGB(0xFFFFFF);
|
||||
}
|
||||
///正文颜色 0x333333
|
||||
+ (UIColor *)mainTextColor {
|
||||
return UIColorFromRGB(0x161958);
|
||||
}
|
||||
/// 二级文字颜色 0x666666
|
||||
+ (UIColor *)secondTextColor {
|
||||
return UIColorFromRGB(0x8A8CAB);
|
||||
}
|
||||
///三级文字的颜色 0x999999
|
||||
+ (UIColor *)textThirdColor {
|
||||
return UIColorFromRGB(0xBABBCD);
|
||||
}
|
||||
///分割线的颜色 0xE8E8E8
|
||||
+ (UIColor *)dividerColor {
|
||||
return UIColorFromRGB(0xE8E8E8);
|
||||
}
|
||||
/* ------页面相关颜色 END------ */
|
||||
|
||||
/* ------Button 相关颜色 START------ */
|
||||
/// button 可用 渐变色的开始 0x3CAAFF
|
||||
+ (UIColor *)confirmButtonGradientStartColor {
|
||||
return UIColorFromRGB(0x13E2F5);
|
||||
}
|
||||
/// button 可用 渐变色的开始 0xB176FF
|
||||
+ (UIColor *)confirmButtonGradientEndColor {
|
||||
return UIColorFromRGB(0xCC66FF);
|
||||
}
|
||||
/// 确定的按钮文字颜色 #FFFFFF
|
||||
+ (UIColor *)confirmButtonTextColor {
|
||||
return UIColorFromRGB(0xFFFFFF);
|
||||
}
|
||||
/// 取消按钮 渐变色的开始 0xF7DDBF
|
||||
+ (UIColor *)cancelButtonGradientStartColor {
|
||||
return UIColorFromRGB(0xCEEFFD);
|
||||
}
|
||||
|
||||
/// button 可用 渐变色的中间 #9CB3FF
|
||||
+ (UIColor *)confirmButtonGradientMiddleColor {
|
||||
return UIColorFromRGB(0xf9CB3FF);
|
||||
}
|
||||
/// 取消按钮 渐变色的结束 0xF7E8C4
|
||||
+ (UIColor *)cancelButtonGradientEndColor {
|
||||
return UIColorFromRGB(0xD2F4F4);
|
||||
}
|
||||
/// 取消的按钮文字颜色 0xFFA936
|
||||
+ (UIColor *)cancelButtonTextColor {
|
||||
return UIColorFromRGB(0x5FCCE4);
|
||||
}
|
||||
/// 取消按钮单一普通背景色 0xFFCE4E
|
||||
+ (UIColor *)cancelButtonNormalBgColor {
|
||||
return UIColorFromRGB(0xCEEFFD);
|
||||
}
|
||||
/// 按钮不可点击背景色 0xD2D5D7
|
||||
+ (UIColor *)disableButtonColor {
|
||||
return UIColorFromRGB(0xCEEFFD);
|
||||
}
|
||||
/// 按钮不可点击文字颜色 0xF9F9F9
|
||||
+ (UIColor *)disableButtonTextColor {
|
||||
return UIColorFromRGB(0xB3B3C3);
|
||||
}
|
||||
/* ------Button 相关颜色 END------ */
|
||||
|
||||
/* ------弹窗相关颜色 START------ */
|
||||
+ (UIColor *)alertBackgroundColor {
|
||||
return UIColorFromRGB(0xFFFFFF);
|
||||
}
|
||||
+ (UIColor *)alertTitleColor {
|
||||
return UIColorFromRGB(0x333333);
|
||||
}
|
||||
+ (UIColor *)alertMessageColor {
|
||||
return UIColorFromRGB(0x333333);
|
||||
}
|
||||
+ (UIColor *)actionSeparatorColor {
|
||||
return UIColorFromRGB(0xF0F0F0);
|
||||
}
|
||||
/* ------弹窗相关颜色 END------ */
|
||||
|
||||
///tabbar 没有点击的时候颜色 0x333333, 0.4
|
||||
+ (UIColor *)tabbarNormalColor {
|
||||
return UIColorRGBAlpha(0x333333, 0.4);
|
||||
}
|
||||
/// tabbar的View的color 0xFFFFFF
|
||||
+ (UIColor *)tabbarViewColor {
|
||||
return UIColorFromRGB(0xFFFFFF);
|
||||
}
|
||||
|
||||
+ (UIColor *)colorWithHexString: (NSString *) hexString {
|
||||
if (hexString.length == 0) {
|
||||
return [UIColor blackColor];
|
||||
}
|
||||
NSString *colorString = [[hexString stringByReplacingOccurrencesOfString: @"#" withString: @""] uppercaseString];
|
||||
CGFloat alpha, red, blue, green;
|
||||
switch ([colorString length]) {
|
||||
case 3: // #RGB
|
||||
alpha = 1.0f;
|
||||
red = [self colorComponentFrom: colorString start: 0 length: 1];
|
||||
green = [self colorComponentFrom: colorString start: 1 length: 1];
|
||||
blue = [self colorComponentFrom: colorString start: 2 length: 1];
|
||||
break;
|
||||
case 4: // #ARGB
|
||||
alpha = [self colorComponentFrom: colorString start: 0 length: 1];
|
||||
red = [self colorComponentFrom: colorString start: 1 length: 1];
|
||||
green = [self colorComponentFrom: colorString start: 2 length: 1];
|
||||
blue = [self colorComponentFrom: colorString start: 3 length: 1];
|
||||
break;
|
||||
case 6: // #RRGGBB
|
||||
alpha = 1.0f;
|
||||
red = [self colorComponentFrom: colorString start: 0 length: 2];
|
||||
green = [self colorComponentFrom: colorString start: 2 length: 2];
|
||||
blue = [self colorComponentFrom: colorString start: 4 length: 2];
|
||||
break;
|
||||
case 8: // #AARRGGBB
|
||||
alpha = [self colorComponentFrom: colorString start: 0 length: 2];
|
||||
red = [self colorComponentFrom: colorString start: 2 length: 2];
|
||||
green = [self colorComponentFrom: colorString start: 4 length: 2];
|
||||
blue = [self colorComponentFrom: colorString start: 6 length: 2];
|
||||
break;
|
||||
default:
|
||||
[NSException raise:@"Invalid color value" format: @"Color value %@ is invalid. It should be a hex value of the form #RBG, #ARGB, #RRGGBB, or #AARRGGBB", hexString];
|
||||
break;
|
||||
}
|
||||
return [UIColor colorWithRed: red green: green blue: blue alpha: alpha];
|
||||
}
|
||||
|
||||
+ (CGFloat) colorComponentFrom: (NSString *) string start: (NSUInteger) start length: (NSUInteger) length {
|
||||
NSString *substring = [string substringWithRange: NSMakeRange(start, length)];
|
||||
NSString *fullHex = length == 2 ? substring : [NSString stringWithFormat: @"%@%@", substring, substring];
|
||||
unsigned hexComponent;
|
||||
[[NSScanner scannerWithString: fullHex] scanHexInt: &hexComponent];
|
||||
return hexComponent / 255.0;
|
||||
}
|
||||
|
||||
///输入框的文本颜色 #1F1A4E
|
||||
+ (UIColor *)inputTextColor {
|
||||
return [self colorWithHexString:@"#1F1A4E"];
|
||||
}
|
||||
|
||||
@end
|
Reference in New Issue
Block a user