<commit_before>//
//  UIColor+WCarColor.swift
//  wascar
//
//  Created by <NAME> on 23/11/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import UIKit

extension UIColor {
	
	/**
	Construct a UIColor using an Int Value RGB formatted value and an alpha value
	
	- parameter r: Red Int value.
	- parameter g: Green Int value.
	- parameter b: Blue Int Value
	- parameter a: Alpha value.
	
	- returns: An UIColor instance that represent the required color
	*/
	convenience init(r: Int, g: Int, b: Int, a: CGFloat) {
		
		let red		= CGFloat(r) / 255.0
		let green	= CGFloat(g) / 255.0
		let blue	= CGFloat(b) / 255.0
		self.init(red: red, green: green, blue: blue, alpha: CGFloat(a))
	}
	
	public func WCARColorToUInt() -> UInt? {
		
		var intColor: UInt?
		
		var fRed : CGFloat = 0, fGreen : CGFloat = 0, fBlue : CGFloat = 0, fAlpha: CGFloat = 0
		if self.getRed(&fRed, green: &fGreen, blue: &fBlue, alpha: &fAlpha) {
			let iRed	= UInt(fRed * 255.0)
			let iGreen	= UInt(fGreen * 255.0)
			let iBlue	= UInt(fBlue * 255.0)
			let iAlpha	= UInt(fAlpha * 255.0)
			
			intColor = (iAlpha << 24) + (iRed << 16) + (iGreen << 8) + iBlue
		}
		
		return intColor
	}
	
	class func WCARBackgroundColor() -> UIColor {
		return UIColor(r: 248, g: 248, b: 248, a: 1)
	}
	
	class func WCARBlueColor() -> UIColor {
		return UIColor(r: 75, g: 95, b: 131, a: 1)
	}
	
	class func WCARRedColor() -> UIColor {
		return UIColor(r: 165, g: 38, b: 38, a: 1)
	}
	
	class func WCAROpenNowGreenColor() -> UIColor {
		return UIColor(r: 104, g: 165, b: 38, a: 1)
	}
	
	class func WCAROpenNowRedColor() -> UIColor {
		return UIColor.WCARRedColor()
	}
}<commit_msg>update red color<commit_after>//
//  UIColor+WCarColor.swift
//  wascar
//
//  Created by <NAME> on 23/11/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import UIKit

extension UIColor {
	
	/**
	Construct a UIColor using an Int Value RGB formatted value and an alpha value
	
	- parameter r: Red Int value.
	- parameter g: Green Int value.
	- parameter b: Blue Int Value
	- parameter a: Alpha value.
	
	- returns: An UIColor instance that represent the required color
	*/
	convenience init(r: Int, g: Int, b: Int, a: CGFloat) {
		
		let red		= CGFloat(r) / 255.0
		let green	= CGFloat(g) / 255.0
		let blue	= CGFloat(b) / 255.0
		self.init(red: red, green: green, blue: blue, alpha: CGFloat(a))
	}
	
	public func WCARColorToUInt() -> UInt? {
		
		var intColor: UInt?
		
		var fRed : CGFloat = 0, fGreen : CGFloat = 0, fBlue : CGFloat = 0, fAlpha: CGFloat = 0
		if self.getRed(&fRed, green: &fGreen, blue: &fBlue, alpha: &fAlpha) {
			let iRed	= UInt(fRed * 255.0)
			let iGreen	= UInt(fGreen * 255.0)
			let iBlue	= UInt(fBlue * 255.0)
			let iAlpha	= UInt(fAlpha * 255.0)
			
			intColor = (iAlpha << 24) + (iRed << 16) + (iGreen << 8) + iBlue
		}
		
		return intColor
	}
	
	class func WCARBackgroundColor() -> UIColor {
		return UIColor(r: 248, g: 248, b: 248, a: 1)
	}
	
	class func WCARBlueColor() -> UIColor {
		return UIColor(r: 75, g: 95, b: 131, a: 1)
	}
	
	class func WCARRedColor() -> UIColor {
		return UIColor(r: 208, g: 2, b: 27, a: 1)
	}
	
	class func WCAROpenNowGreenColor() -> UIColor {
		return UIColor(r: 104, g: 165, b: 38, a: 1)
	}
	
	class func WCAROpenNowRedColor() -> UIColor {
		return UIColor.WCARRedColor()
	}
}
{'fraction_non_alphanumeric': 0.137910085054678, 'fraction_numerical': 0.04951397326852977, 'mean_word_length': 2.897041420118343, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1885332', 'n_tokens_mistral': 1532, 'n_tokens_neox': 1291, 'n_words': 406}