//
//  UIColor+YMAdditions.h
//  PCDBank
//
//  Created by Gusont on 2020/12/11.
//  Copyright © 2020 YMBank. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIColor (YMAdditions)

/**
 *  @brief 将16进制色值转成RGB值
 *
 *  @param hexColor 16进制色值
 *
 *  @return UIColor
 */
+(UIColor *)colorWithHex:(long)hexColor;

/**
 *  @brief 将16进制色值转成RGB值
 *
 *  @param hexColor 16进制色值
 *  @param alpha 透明度 0～1之间的浮点数
 *
 *  @return UIColor
 */
+(UIColor *)colorWithHex:(long)hexColor alpha:(float)alpha ;

/**
 *  @brief  获取随机颜色
 *
 *  @return 随机颜色
 */
+(UIColor *)randomColor;

/**
 *  @brief  字符串转化为颜色
 *
 *  @param string 字符串
 *
 *  @return 颜色
 */
+(UIColor *)colorFormString:(NSString *)string;

+ (UIColor *)colorFromHexString:(NSString *)title alpha:(CGFloat)alpha;
@end

NS_ASSUME_NONNULL_END
