BGColorMacro.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. //
  2. // BGColorMacro.h
  3. // BuguLive
  4. //
  5. // Created by xfg on 16/7/21.
  6. // Copyright © 2016年 xfg. All rights reserved.
  7. //
  8. #ifndef FWColorMacro_h
  9. #define FWColorMacro_h
  10. #import "UIColor+MLPFlatColors.h"
  11. #import "UIColor+HEX.h"
  12. #import "BGCommonMacro.h"
  13. // ====================================取色值相关的方法==========================================
  14. #define RGB(r,g,b) [UIColor colorWithRed:(r)/255.f \
  15. green:(g)/255.f \
  16. blue:(b)/255.f \
  17. alpha:1.f]
  18. #define RGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.f \
  19. green:(g)/255.f \
  20. blue:(b)/255.f \
  21. alpha:(a)]
  22. #define RGBOF(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
  23. green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
  24. blue:((float)(rgbValue & 0xFF))/255.0 \
  25. alpha:1.0]
  26. #define RGBA_OF(rgbValue) [UIColor colorWithRed:((float)(((rgbValue) & 0xFF000000) >> 24))/255.0 \
  27. green:((float)(((rgbValue) & 0x00FF0000) >> 16))/255.0 \
  28. blue:((float)(rgbValue & 0x0000FF00) >> 8)/255.0 \
  29. alpha:((float)(rgbValue & 0x000000FF))/255.0]
  30. #define RGBAOF(v, a) [UIColor colorWithRed:((float)(((v) & 0xFF0000) >> 16))/255.0 \
  31. green:((float)(((v) & 0x00FF00) >> 8))/255.0 \
  32. blue:((float)(v & 0x0000FF))/255.0 \
  33. alpha:a]
  34. #define kColorWithStr(colorStr) [UIColor colorWithHexString:colorStr]
  35. // =====================================通用颜色=========================================
  36. #define kBlackColor [UIColor blackColor]
  37. #define kDarkGrayColor [UIColor darkGrayColor]
  38. #define kLightGrayColor [UIColor lightGrayColor]
  39. #define kWhiteColor [UIColor whiteColor]
  40. #define kGrayColor [UIColor grayColor]
  41. #define kRedColor [UIColor redColor]
  42. #define kGreenColor [UIColor greenColor]
  43. #define kBlueColor [UIColor blueColor]
  44. #define kCyanColor [UIColor cyanColor]
  45. #define kYellowColor [UIColor yellowColor]
  46. #define kMagentaColor [UIColor magentaColor]
  47. #define kOrangeColor [UIColor orangeColor]
  48. #define kPurpleColor [UIColor purpleColor]
  49. #define kClearColor [UIColor clearColor]
  50. #define kRandomFlatColor [UIColor randomFlatColor]
  51. //头饰比例BGTRTCLiveController
  52. #define headdressRatio (86/64.0) // (80/50.0)
  53. // View 圆角
  54. #define ViewRadius(View, Radius)\
  55. \
  56. [View.layer setCornerRadius:(Radius)];\
  57. [View.layer setMasksToBounds:YES]
  58. // =====================================以下为大众色值(可能整个app都有用到)=========================================
  59. #define kAppMainColor AppMainColor() // app主色调
  60. #define kAppNewMainColor [UIColor colorWithHexString:@"#6ECAFF"] // app主色调
  61. static __inline__ UIColor* AppMainColor()
  62. {
  63. if (kIsCheckingVersion())
  64. {
  65. return kCheckVMainColor;
  66. }
  67. else
  68. {
  69. return RGB(51, 51, 51); // #333333
  70. }
  71. }
  72. #define kAppSecondaryColor RGB(254, 226, 4) // app辅色调,#fee204
  73. #define kNavBarThemeColor [UIColor whiteColor] // 导航主色调
  74. // 默认背景色
  75. #define kBackGroundColor [UIColor whiteColor]
  76. //RGB(248, 248, 248) // #f8f8f8
  77. // 灰色字体(颜色:由深到浅)
  78. #define kAppGrayColor1 RGB(51, 51, 51) // #333333
  79. #define kAppGrayColor2 RGB(102, 102, 102) // #666666
  80. #define kAppGrayColor3 RGB(153, 153, 153) // #999999
  81. #define kAppGrayColor4 RGB(203, 203, 203) // 新版用到的地方较少
  82. #define kAppGrayColor5 RGB(28, 28, 28) // 竞拍主页竞拍记录等文字的颜色
  83. #define kAppGrayColor6 RGB(78, 83, 90) // 竞拍失败最下面的颜色
  84. #define kAppGrayColor7 RGB(107, 115, 123) // 竞拍失败(主播关闭竞拍)的颜色
  85. #define kAppGrayColor8 RGB(238, 237, 237)
  86. // 间隔、线条颜色
  87. #define kAppSpaceColor RGB(231, 231, 241)
  88. #define kAppSpaceColor2 RGB(235, 238, 238)
  89. #define kAppSpaceColor3 RGB(248, 248, 248)
  90. #define kAppSpaceColor4 RGB(231, 231, 241) // e7e7f1
  91. #define kAppRechargeBtnColor RGB(255,159,134) // 充值按钮的未选中的时候的颜色
  92. #define kAppBorderColor [(kAppSpaceColor) CGColor] // 边框颜色
  93. #define kAppRechargeSelectColor kWhiteColor //充值按钮选中时候的颜色
  94. // 黑色透明色(透明度:由高到低)
  95. #define kGrayTransparentColor1 [[UIColor blackColor] colorWithAlphaComponent:0.1]
  96. #define kGrayTransparentColor2 [[UIColor blackColor] colorWithAlphaComponent:0.2]
  97. #define kGrayTransparentColor2_1 [[UIColor blackColor] colorWithAlphaComponent:0.3]
  98. #define kGrayTransparentColor3 [[UIColor blackColor] colorWithAlphaComponent:0.4]
  99. #define kGrayTransparentColor3_1 [[UIColor blackColor] colorWithAlphaComponent:0.5]
  100. #define kGrayTransparentColor4 [[UIColor blackColor] colorWithAlphaComponent:0.6]
  101. #define kGrayTransparentColor4_1 [[UIColor blackColor] colorWithAlphaComponent:0.7]
  102. #define kGrayTransparentColor5 [[UIColor blackColor] colorWithAlphaComponent:0.85]
  103. #define kGrayTransparentColor6 [[UIColor blackColor] colorWithAlphaComponent:0.95]
  104. #define kAuctionBtnColor RGB(255, 117, 81)
  105. #define KMGLineColor [UIColor colorWithHexString:@"#E1E1E1"]
  106. #define KMGMainBGColor kWhiteColor
  107. #define KMGMainFontColor kBlackColor
  108. #define KMGMainBlueFontColor [UIColor colorWithHexString:@"#14D8E5"]
  109. // ====================================以下为小众色值(可能单纯某个类用到)==========================================
  110. // 竞拍
  111. #define kAppPurpleColor RGB(255, 245, 246) // 竞拍详情的淡粉色
  112. #define kAuctionBtnColor RGB(255, 117, 81)
  113. // 直播页的相关色值
  114. #define myTextColorUser [UIColor colorWithHexString:@"#6CF4EC"] // 用户名
  115. //@"6cc9e6"
  116. #define myTextColorCommonMessageUser [UIColor colorWithHexString:@"#6CF4EC"]
  117. //[UIColor colorWithHexString:@"40aa53"] // 用户名
  118. #define myTextColorCommonMessage RGB(255, 255, 255) // 普通消息颜色
  119. #define myTextColorSendGift [UIColor colorWithHexString:@"ff4081"] // 送礼物时的颜色
  120. #define myTextColorLivingMessage [UIColor colorWithHexString:@"#6CF4EC"]
  121. //@"40aa53"] // 直播消息颜色
  122. #define myTextColorRedPackage RGB(247, 103, 118) // 红包消息颜色
  123. #define kTextColorSendLight RGB(255, 255, 255) // 点亮消息颜色
  124. #define kTextColorSenderName kWhiteColor // 送礼物者的名字颜色
  125. #define myTextRedColorLivingMessage kRedColor // 竞拍的名字颜色
  126. #define kAppPluginSpaceColor RGB(153,153,153) // 插件中心分隔线颜色
  127. //page点的颜色
  128. #define myPageColor RGB(255, 117, 81) // pageController点的颜色
  129. #define myCurrentPageColor RGB(13, 13, 13) // 当前点的颜色
  130. #define kAppRedColor RGB(251, 207, 206) // 认证页面的红色
  131. //字体颜色
  132. #define myTextColor [UIColor grayColor]
  133. #define myTextColor1 [UIColor colorWithRed:0.24 green:0.24 blue:0.24 alpha:1]
  134. #define myTextColor2 [UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:1]
  135. #define myTextColor3 [UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1]
  136. #define myTextColorLine1 [UIColor colorWithRed:0.24 green:0.24 blue:0.24 alpha:0.2]
  137. #define myTextColorLine2 [UIColor colorWithRed:0.24 green:0.24 blue:0.24 alpha:0.1]
  138. #define myTextColorLine3 [[UIColor blackColor] colorWithAlphaComponent:0.2]
  139. #define myTextColorLine4 [[UIColor blackColor] colorWithAlphaComponent:0.05]
  140. #define myTextColorLine5 [[UIColor blackColor] colorWithAlphaComponent:0.1]
  141. #define myTextColorLine6 [[UIColor blackColor] colorWithAlphaComponent:0.5]
  142. #define myTextColorLine7 [[UIColor whiteColor] colorWithAlphaComponent:0.2]
  143. #define myTextColorLine8 [[UIColor whiteColor] colorWithAlphaComponent:0.5]
  144. #define myTextColorLine9 [[UIColor whiteColor] colorWithAlphaComponent:0.1]
  145. #define textColor1 RGB(100,107,109)
  146. #define textColor2 RGB(217,224,225)
  147. #define textColor3 RGB(240,161,163)
  148. #define textColor4 RGB(85,85,85) // 贡献榜字的颜色
  149. #define textColor5 RGB(129,210,235) // 音乐歌手名字的颜色
  150. // 公会
  151. #define kFamilyBackGroundColor RGB(236,236,236) // 公会详情背景的颜色
  152. #define kAppFamilyBtnColor RGB(95,204,174) // 公会相关按钮颜色(拒绝按钮,创建公会按钮颜色)
  153. // 游戏相关颜色
  154. #define goldColor RGB(255, 215, 0) // 金色
  155. #define lightGoldColor RGB(250, 250, 210) // 亮金色
  156. #define kGoldFolwerColor RGB(251, 56, 70) // 炸金花描边颜色
  157. #define kBullPokerColor RGB(255, 175, 61) // 斗牛描边颜色
  158. #define kAppH5MainColor RGB(247, 52, 45) // H5颜色
  159. #define Main_textColor UIColorFromRGB(0x7e37fb)
  160. //RGB(246, 246, 246)
  161. #define navigationBGColor UIColorFromRGB(0xffffff)
  162. #define navtionTitleColor [UIColor blackColor]
  163. #define navtionTitleFont [UIFont systemFontOfSize:18 weight:.2]
  164. #endif /* FWColorMacro_h */