//
//  UIColor+Expanded.m
//  MCheck
//
//  Created by KangSH on 2016. 7. 14..
//  Copyright © 2016년 KangSH. All rights reserved.
//

#import "UIColor+Expanded.h"

@implementation UIColor (Expanded)

+ (UIColor *)colorWithRGBHex:(NSUInteger)RGBHex {
    CGFloat red = ((CGFloat)((RGBHex & 0xFF0000) >> 16)) / 255.0f;
    CGFloat green = ((CGFloat)((RGBHex & 0xFF00) >> 8)) / 255.0f;
    CGFloat blue = ((CGFloat)((RGBHex & 0xFF))) / 255.0f;
    return [UIColor colorWithRed:red green:green blue:blue alpha:1.0f];
}

+ (UIColor *)colorWithRGBHex:(NSUInteger)RGBHex alpha:(CGFloat)alpha {
    CGFloat red = ((CGFloat)((RGBHex & 0xFF0000) >> 16)) / 255.0f;
    CGFloat green = ((CGFloat)((RGBHex & 0xFF00) >> 8)) / 255.0f;
    CGFloat blue = ((CGFloat)((RGBHex & 0xFF))) / 255.0f;
    return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
}


@end
