FWColorWrapper

@interface FWColorWrapper : FWObjectWrapper

Undocumented

FWTheme

  • 获取当前主题样式对应静态颜色,主要用于iOS13以下兼容主题切换

    Declaration

    Objective-C

    @property (nonatomic, readonly) UIColor *_Nonnull color;
  • 指定主题样式获取对应静态颜色,iOS13+可跟随系统改变

    Declaration

    Objective-C

    - (nonnull UIColor *)colorForStyle:(FWThemeStyle)style;
  • 是否是主题颜色,仅支持判断使用fwTheme创建的颜色

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isThemeColor;

FWToolkit

  • 获取当前颜色指定透明度的新颜色

    Declaration

    Objective-C

    - (nonnull UIColor *)colorWithAlpha:(CGFloat)alpha;
  • 读取颜色的十六进制值RGB,不含透明度

    Declaration

    Objective-C

    @property (nonatomic, readonly) long hexValue;
  • 读取颜色的透明度值,范围0~1

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat alphaValue;
  • 读取颜色的十六进制字符串RGB,不含透明度

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull hexString;
  • 读取颜色的十六进制字符串RGBA|ARGB(透明度为1时RGB),包含透明度

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull hexStringWithAlpha;