text: //
  //  UIColor+TWAdd.h
  //  ZHSQMobileApp
  //
  //  Created by 研发部 on 2021/5/7.
  //
  
  #import <UIKit/UIKit.h>
  
  NS_ASSUME_NONNULL_BEGIN
  
  /*
   Create UIColor with a hex string.
   Example: UIColorHex(0xF0F), UIColorHex(66ccff), UIColorHex(#66CCFF88)
   
   Valid format: #RGB #RGBA #RRGGBB #RRGGBBAA 0xRGB ...
   The `#` or "0x" sign is not required.
   */
  #ifndef UIColorHex
  #define UIColorHex(_hex_)   [UIColor colorWithHexString:((__bridge NSString *)CFSTR(#_hex_))]
  #endif
  
  @interface UIColor (TWAdd)
  /**
   Creates and returns a color object from hex string.
   
   @discussion:
   Valid format: #RGB #RGBA #RRGGBB #RRGGBBAA 0xRGB ...
   The `#` or "0x" sign is not required.
   The alpha will be set to 1.0 if there is no alpha component.
   It will return nil when an error occurs in parsing.
   
   Example: @"0xF0F", @"66ccff", @"#66CCFF88"
   
   @param hexStr  The hex string value for the new color.
   
   @return        An UIColor object from string, or nil if an error occurs.
   */
  + (nullable UIColor *)colorWithHexString:(NSString *)hexStr;
  
  + (UIColor *)randomColor;
  
  @end
  
  NS_ASSUME_NONNULL_END
  