<commit_before>//
//  Colors.swift
//  HTWDD
//
//  Created by <NAME> on 19.10.17.
//  Copyright © 2017 HTW Dresden. All rights reserved.
//

import UIKit.UIColor

extension UIColor {

    convenience init(hex: UInt, alpha: CGFloat = 1.0) {
        self.init(
            red: CGFloat((hex & 0xFF0000) >> 16) / 255.0,
            green: CGFloat((hex & 0x00FF00) >> 8)  / 255.0,
            blue: CGFloat(hex & 0x0000FF)        / 255.0,
            alpha: alpha
        )
    }

	func hex() -> UInt {
		var r: CGFloat = 0
		var g: CGFloat = 0
		var b: CGFloat = 0
		
		self.getRed(&r, green: &g, blue: &b, alpha: nil)
		
		let rh: UInt = UInt(r * 255)
		let gh: UInt = UInt(g * 255)
		let bh: UInt = UInt(b * 255)
		
		return (rh << 16) + (gh << 8) + bh
	}
}

extension HTWNamespace where Base: UIColor {

    static var blue: UIColor {
        return UIColor(hex: 0x004d98)
    }
	
    static var orange: UIColor {
        return UIColor(hex: 0xF1A13D)
    }
    
    static var green: UIColor {
        return UIColor(hex: 0x2ecc71)
    }
	
	static var red: UIColor {<commit_msg>More vibrant HTW.blue color<commit_after>//
//  Colors.swift
//  HTWDD
//
//  Created by <NAME> on 19.10.17.
//  Copyright © 2017 HTW Dresden. All rights reserved.
//

import UIKit.UIColor

extension UIColor {

    convenience init(hex: UInt, alpha: CGFloat = 1.0) {
        self.init(
            red: CGFloat((hex & 0xFF0000) >> 16) / 255.0,
            green: CGFloat((hex & 0x00FF00) >> 8)  / 255.0,
            blue: CGFloat(hex & 0x0000FF)        / 255.0,
            alpha: alpha
        )
    }

	func hex() -> UInt {
		var r: CGFloat = 0
		var g: CGFloat = 0
		var b: CGFloat = 0
		
		self.getRed(&r, green: &g, blue: &b, alpha: nil)
		
		let rh: UInt = UInt(r * 255)
		let gh: UInt = UInt(g * 255)
		let bh: UInt = UInt(b * 255)
		
		return (rh << 16) + (gh << 8) + bh
	}
}

extension HTWNamespace where Base: UIColor {

    static var blue: UIColor {
        return UIColor(hex: 0x003DA2)
    }
	
    static var orange: UIColor {
        return UIColor(hex: 0xF1A13D)
    }
    
    static var green: UIColor {
        return UIColor(hex: 0x2ECC5D)
    }
	
	static var red: UIColor {
{'fraction_non_alphanumeric': 0.1310947562097516, 'fraction_numerical': 0.06439742410303588, 'mean_word_length': 1.9591836734693877, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '5493567', 'n_tokens_mistral': 989, 'n_tokens_neox': 849, 'n_words': 235}