├── .gitattributes ├── LICENSE ├── README.md ├── RGB.podspec ├── RGB.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── roy.xcuserdatad │ └── xcschemes │ └── RGB.xcscheme ├── RGB ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── ViewController.h ├── ViewController.m ├── logo.png └── main.m ├── RGBClassess ├── RRGB.h └── RRGB.m ├── RGBTests ├── Info.plist └── RGBTests.m ├── RGBUITests ├── Info.plist └── RGBUITests.m ├── images ├── arrow-down.png └── octocat-small.png ├── index.html ├── javascripts └── scale.fix.js ├── params.json └── stylesheets ├── github-light.css └── styles.css /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=Objective-C 2 | *.css linguist-language=Objective-C 3 | *.html linguist-language=Objective-C 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 ROYcms最佳C#开源CMS 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Logo](https://roycms.github.io/RGB/RGB/logo.png) 2 | RGB 3 | === 4 | RGB color value to the UIColor conversion kit. 5 | 6 | [![Shippable](https://img.shields.io/shippable/5444c5ecb904a4b21567b0ff.svg?maxAge=2592000?style=flat-square)](https://github.com/roycms/RAlertView) 7 | [![CocoaPods](https://img.shields.io/badge/pod-0.0.1-red.svg)](http://cocoapods.org/?q=RAlertView) 8 | [![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg?maxAge=2592000?style=flat-square)](https://github.com/roycms/RAlertView/blob/master/LICENSE) 9 | [![email](https://img.shields.io/badge/%20email%20-%20roycms%40qq.com%20-yellowgreen.svg)](mailto:roycms@qq.com) 10 | 11 | ## Installation 12 | - Import the main header file:`#import "RRGB.h"` 13 | 14 | ## cocoapods 15 | ` pod 'RGB' ` 16 | 17 | ## Use 18 | return type UIColor 19 | ```objective-c 20 | UIColor *color = RGB16(0x3d3d3d); 21 | UIColor *color = RGB(@"3d3d3d"); 22 | 23 | [self.view setBackgroundColor:RGB(@"#1abc9d")]; 24 | [self.view setBackgroundColor:RGB16(0x1abc9d)]; 25 | ``` 26 | 27 | ## 期待 28 | * 如果在使用过程中遇到BUG,希望你能Issues我,谢谢(或者尝试下载最新的框架代码看看BUG修复没有) 29 | * 如果在使用过程中发现功能不够用,希望你能Issues我,我非常想为这个框架增加更多好用的功能,谢谢 30 | * 如果你想为RGB输出代码,请拼命Pull Requests我 31 | -------------------------------------------------------------------------------- /RGB.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint RAlertView.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "RGB" 19 | s.version = "0.0.2" 20 | s.summary = "RGB 0.0.2" 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = %{ 28 | RGB color value to the UIColor conversion kit. 29 | } 30 | 31 | s.homepage = "https://github.com/roycms/RGB" 32 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 33 | 34 | 35 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 36 | # 37 | # Licensing your code is important. See http://choosealicense.com for more info. 38 | # CocoaPods will detect a license file if there is a named LICENSE* 39 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 40 | # 41 | 42 | s.license = { :type => "MIT", :file => "LICENSE" } 43 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 44 | 45 | 46 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 47 | # 48 | # Specify the authors of the library, with email addresses. Email addresses 49 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 50 | # accepts just a name if you'd rather not provide an email address. 51 | # 52 | # Specify a social_media_url where others can refer to, for example a twitter 53 | # profile URL. 54 | # 55 | 56 | s.author = { "roycms" => "roycms@qq.com" } 57 | # Or just: s.author = "roycms" 58 | # s.authors = { "roycms" => "roycms@qq.com" } 59 | # s.social_media_url = "http://twitter.com/roycms" 60 | 61 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 62 | # 63 | # If this Pod runs only on iOS or OS X, then specify the platform and 64 | # the deployment target. You can optionally include the target after the platform. 65 | # 66 | 67 | # s.platform = :ios 68 | # s.platform = :ios, "5.0" 69 | 70 | # When using multiple platforms 71 | # s.ios.deployment_target = "5.0" 72 | # s.osx.deployment_target = "10.7" 73 | # s.watchos.deployment_target = "2.0" 74 | # s.tvos.deployment_target = "9.0" 75 | 76 | 77 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 78 | # 79 | # Specify the location from where the source should be retrieved. 80 | # Supports git, hg, bzr, svn and HTTP. 81 | # 82 | 83 | s.source = { :git => "https://github.com/roycms/RGB.git", :tag => "0.0.2" } 84 | 85 | 86 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 87 | # 88 | # CocoaPods is smart about how it includes source code. For source files 89 | # giving a folder will include any swift, h, m, mm, c & cpp files. 90 | # For header files it will include any header in the folder. 91 | # Not including the public_header_files will make all headers public. 92 | # 93 | 94 | s.source_files = "RGBClassess/*.*" 95 | # s.exclude_files = "Classes/Exclude" 96 | 97 | # s.public_header_files = "Classes/**/*.h" 98 | 99 | 100 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 101 | # 102 | # A list of resources included with the Pod. These are copied into the 103 | # target bundle with a build phase script. Anything else will be cleaned. 104 | # You can preserve files from being cleaned, please don't preserve 105 | # non-essential files like tests, examples and documentation. 106 | # 107 | 108 | # s.resource = "icon.png" 109 | # s.resources = "Resources/*.png" 110 | 111 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 112 | 113 | 114 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 115 | # 116 | # Link your library with frameworks, or libraries. Libraries do not include 117 | # the lib prefix of their name. 118 | # 119 | 120 | # s.framework = "SomeFramework" 121 | # s.frameworks = "SomeFramework", "AnotherFramework" 122 | s.ios.frameworks = 'Foundation', 'UIKit' 123 | # s.library = "iconv" 124 | # s.libraries = "iconv", "xml2" 125 | 126 | 127 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 128 | # 129 | # If your library depends on compiler flags you can set them in the xcconfig hash 130 | # where they will only apply to your library. If you depend on other Podspecs 131 | # you can include multiple dependencies to ensure it works. 132 | 133 | # s.requires_arc = true 134 | 135 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 136 | # s.dependency "JSONKit", "~> 1.4" 137 | s.ios.deployment_target = '8.0' # minimum SDK with autolayout 138 | # s.osx.deployment_target = '10.7' # minimum SDK with autolayout 139 | end 140 | -------------------------------------------------------------------------------- /RGB.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B0157A1C1DB744A7006EDFD9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B0157A1B1DB744A7006EDFD9 /* main.m */; }; 11 | B0157A1F1DB744A7006EDFD9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B0157A1E1DB744A7006EDFD9 /* AppDelegate.m */; }; 12 | B0157A221DB744A7006EDFD9 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B0157A211DB744A7006EDFD9 /* ViewController.m */; }; 13 | B0157A251DB744A7006EDFD9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0157A231DB744A7006EDFD9 /* Main.storyboard */; }; 14 | B0157A271DB744A7006EDFD9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0157A261DB744A7006EDFD9 /* Assets.xcassets */; }; 15 | B0157A2A1DB744A7006EDFD9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0157A281DB744A7006EDFD9 /* LaunchScreen.storyboard */; }; 16 | B0157A351DB744A7006EDFD9 /* RGBTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B0157A341DB744A7006EDFD9 /* RGBTests.m */; }; 17 | B0157A401DB744A7006EDFD9 /* RGBUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = B0157A3F1DB744A7006EDFD9 /* RGBUITests.m */; }; 18 | B0157A501DB7456A006EDFD9 /* RRGB.m in Sources */ = {isa = PBXBuildFile; fileRef = B0157A4F1DB7456A006EDFD9 /* RRGB.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | B0157A311DB744A7006EDFD9 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = B0157A0F1DB744A6006EDFD9 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = B0157A161DB744A7006EDFD9; 27 | remoteInfo = RGB; 28 | }; 29 | B0157A3C1DB744A7006EDFD9 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = B0157A0F1DB744A6006EDFD9 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = B0157A161DB744A7006EDFD9; 34 | remoteInfo = RGB; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | B0157A171DB744A7006EDFD9 /* RGB.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RGB.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | B0157A1B1DB744A7006EDFD9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 41 | B0157A1D1DB744A7006EDFD9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 42 | B0157A1E1DB744A7006EDFD9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 43 | B0157A201DB744A7006EDFD9 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 44 | B0157A211DB744A7006EDFD9 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 45 | B0157A241DB744A7006EDFD9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | B0157A261DB744A7006EDFD9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | B0157A291DB744A7006EDFD9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | B0157A2B1DB744A7006EDFD9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | B0157A301DB744A7006EDFD9 /* RGBTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RGBTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | B0157A341DB744A7006EDFD9 /* RGBTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RGBTests.m; sourceTree = ""; }; 51 | B0157A361DB744A7006EDFD9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | B0157A3B1DB744A7006EDFD9 /* RGBUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RGBUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | B0157A3F1DB744A7006EDFD9 /* RGBUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RGBUITests.m; sourceTree = ""; }; 54 | B0157A411DB744A7006EDFD9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | B0157A4E1DB7456A006EDFD9 /* RRGB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RRGB.h; sourceTree = ""; }; 56 | B0157A4F1DB7456A006EDFD9 /* RRGB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RRGB.m; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | B0157A141DB744A7006EDFD9 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | B0157A2D1DB744A7006EDFD9 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | B0157A381DB744A7006EDFD9 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | B0157A0E1DB744A6006EDFD9 = { 85 | isa = PBXGroup; 86 | children = ( 87 | B0157A4D1DB74546006EDFD9 /* RGBClassess */, 88 | B0157A191DB744A7006EDFD9 /* RGB */, 89 | B0157A331DB744A7006EDFD9 /* RGBTests */, 90 | B0157A3E1DB744A7006EDFD9 /* RGBUITests */, 91 | B0157A181DB744A7006EDFD9 /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | B0157A181DB744A7006EDFD9 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | B0157A171DB744A7006EDFD9 /* RGB.app */, 99 | B0157A301DB744A7006EDFD9 /* RGBTests.xctest */, 100 | B0157A3B1DB744A7006EDFD9 /* RGBUITests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | B0157A191DB744A7006EDFD9 /* RGB */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | B0157A1D1DB744A7006EDFD9 /* AppDelegate.h */, 109 | B0157A1E1DB744A7006EDFD9 /* AppDelegate.m */, 110 | B0157A201DB744A7006EDFD9 /* ViewController.h */, 111 | B0157A211DB744A7006EDFD9 /* ViewController.m */, 112 | B0157A231DB744A7006EDFD9 /* Main.storyboard */, 113 | B0157A261DB744A7006EDFD9 /* Assets.xcassets */, 114 | B0157A281DB744A7006EDFD9 /* LaunchScreen.storyboard */, 115 | B0157A2B1DB744A7006EDFD9 /* Info.plist */, 116 | B0157A1A1DB744A7006EDFD9 /* Supporting Files */, 117 | ); 118 | path = RGB; 119 | sourceTree = ""; 120 | }; 121 | B0157A1A1DB744A7006EDFD9 /* Supporting Files */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | B0157A1B1DB744A7006EDFD9 /* main.m */, 125 | ); 126 | name = "Supporting Files"; 127 | sourceTree = ""; 128 | }; 129 | B0157A331DB744A7006EDFD9 /* RGBTests */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | B0157A341DB744A7006EDFD9 /* RGBTests.m */, 133 | B0157A361DB744A7006EDFD9 /* Info.plist */, 134 | ); 135 | path = RGBTests; 136 | sourceTree = ""; 137 | }; 138 | B0157A3E1DB744A7006EDFD9 /* RGBUITests */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | B0157A3F1DB744A7006EDFD9 /* RGBUITests.m */, 142 | B0157A411DB744A7006EDFD9 /* Info.plist */, 143 | ); 144 | path = RGBUITests; 145 | sourceTree = ""; 146 | }; 147 | B0157A4D1DB74546006EDFD9 /* RGBClassess */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | B0157A4E1DB7456A006EDFD9 /* RRGB.h */, 151 | B0157A4F1DB7456A006EDFD9 /* RRGB.m */, 152 | ); 153 | path = RGBClassess; 154 | sourceTree = ""; 155 | }; 156 | /* End PBXGroup section */ 157 | 158 | /* Begin PBXNativeTarget section */ 159 | B0157A161DB744A7006EDFD9 /* RGB */ = { 160 | isa = PBXNativeTarget; 161 | buildConfigurationList = B0157A441DB744A7006EDFD9 /* Build configuration list for PBXNativeTarget "RGB" */; 162 | buildPhases = ( 163 | B0157A131DB744A7006EDFD9 /* Sources */, 164 | B0157A141DB744A7006EDFD9 /* Frameworks */, 165 | B0157A151DB744A7006EDFD9 /* Resources */, 166 | ); 167 | buildRules = ( 168 | ); 169 | dependencies = ( 170 | ); 171 | name = RGB; 172 | productName = RGB; 173 | productReference = B0157A171DB744A7006EDFD9 /* RGB.app */; 174 | productType = "com.apple.product-type.application"; 175 | }; 176 | B0157A2F1DB744A7006EDFD9 /* RGBTests */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = B0157A471DB744A7006EDFD9 /* Build configuration list for PBXNativeTarget "RGBTests" */; 179 | buildPhases = ( 180 | B0157A2C1DB744A7006EDFD9 /* Sources */, 181 | B0157A2D1DB744A7006EDFD9 /* Frameworks */, 182 | B0157A2E1DB744A7006EDFD9 /* Resources */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | B0157A321DB744A7006EDFD9 /* PBXTargetDependency */, 188 | ); 189 | name = RGBTests; 190 | productName = RGBTests; 191 | productReference = B0157A301DB744A7006EDFD9 /* RGBTests.xctest */; 192 | productType = "com.apple.product-type.bundle.unit-test"; 193 | }; 194 | B0157A3A1DB744A7006EDFD9 /* RGBUITests */ = { 195 | isa = PBXNativeTarget; 196 | buildConfigurationList = B0157A4A1DB744A7006EDFD9 /* Build configuration list for PBXNativeTarget "RGBUITests" */; 197 | buildPhases = ( 198 | B0157A371DB744A7006EDFD9 /* Sources */, 199 | B0157A381DB744A7006EDFD9 /* Frameworks */, 200 | B0157A391DB744A7006EDFD9 /* Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | B0157A3D1DB744A7006EDFD9 /* PBXTargetDependency */, 206 | ); 207 | name = RGBUITests; 208 | productName = RGBUITests; 209 | productReference = B0157A3B1DB744A7006EDFD9 /* RGBUITests.xctest */; 210 | productType = "com.apple.product-type.bundle.ui-testing"; 211 | }; 212 | /* End PBXNativeTarget section */ 213 | 214 | /* Begin PBXProject section */ 215 | B0157A0F1DB744A6006EDFD9 /* Project object */ = { 216 | isa = PBXProject; 217 | attributes = { 218 | LastUpgradeCheck = 0800; 219 | ORGANIZATIONNAME = roycms; 220 | TargetAttributes = { 221 | B0157A161DB744A7006EDFD9 = { 222 | CreatedOnToolsVersion = 8.0; 223 | ProvisioningStyle = Automatic; 224 | }; 225 | B0157A2F1DB744A7006EDFD9 = { 226 | CreatedOnToolsVersion = 8.0; 227 | ProvisioningStyle = Automatic; 228 | TestTargetID = B0157A161DB744A7006EDFD9; 229 | }; 230 | B0157A3A1DB744A7006EDFD9 = { 231 | CreatedOnToolsVersion = 8.0; 232 | ProvisioningStyle = Automatic; 233 | TestTargetID = B0157A161DB744A7006EDFD9; 234 | }; 235 | }; 236 | }; 237 | buildConfigurationList = B0157A121DB744A6006EDFD9 /* Build configuration list for PBXProject "RGB" */; 238 | compatibilityVersion = "Xcode 3.2"; 239 | developmentRegion = English; 240 | hasScannedForEncodings = 0; 241 | knownRegions = ( 242 | en, 243 | Base, 244 | ); 245 | mainGroup = B0157A0E1DB744A6006EDFD9; 246 | productRefGroup = B0157A181DB744A7006EDFD9 /* Products */; 247 | projectDirPath = ""; 248 | projectRoot = ""; 249 | targets = ( 250 | B0157A161DB744A7006EDFD9 /* RGB */, 251 | B0157A2F1DB744A7006EDFD9 /* RGBTests */, 252 | B0157A3A1DB744A7006EDFD9 /* RGBUITests */, 253 | ); 254 | }; 255 | /* End PBXProject section */ 256 | 257 | /* Begin PBXResourcesBuildPhase section */ 258 | B0157A151DB744A7006EDFD9 /* Resources */ = { 259 | isa = PBXResourcesBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | B0157A2A1DB744A7006EDFD9 /* LaunchScreen.storyboard in Resources */, 263 | B0157A271DB744A7006EDFD9 /* Assets.xcassets in Resources */, 264 | B0157A251DB744A7006EDFD9 /* Main.storyboard in Resources */, 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | B0157A2E1DB744A7006EDFD9 /* Resources */ = { 269 | isa = PBXResourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | }; 275 | B0157A391DB744A7006EDFD9 /* Resources */ = { 276 | isa = PBXResourcesBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | /* End PBXResourcesBuildPhase section */ 283 | 284 | /* Begin PBXSourcesBuildPhase section */ 285 | B0157A131DB744A7006EDFD9 /* Sources */ = { 286 | isa = PBXSourcesBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | B0157A221DB744A7006EDFD9 /* ViewController.m in Sources */, 290 | B0157A1F1DB744A7006EDFD9 /* AppDelegate.m in Sources */, 291 | B0157A501DB7456A006EDFD9 /* RRGB.m in Sources */, 292 | B0157A1C1DB744A7006EDFD9 /* main.m in Sources */, 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | B0157A2C1DB744A7006EDFD9 /* Sources */ = { 297 | isa = PBXSourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | B0157A351DB744A7006EDFD9 /* RGBTests.m in Sources */, 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | }; 304 | B0157A371DB744A7006EDFD9 /* Sources */ = { 305 | isa = PBXSourcesBuildPhase; 306 | buildActionMask = 2147483647; 307 | files = ( 308 | B0157A401DB744A7006EDFD9 /* RGBUITests.m in Sources */, 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | }; 312 | /* End PBXSourcesBuildPhase section */ 313 | 314 | /* Begin PBXTargetDependency section */ 315 | B0157A321DB744A7006EDFD9 /* PBXTargetDependency */ = { 316 | isa = PBXTargetDependency; 317 | target = B0157A161DB744A7006EDFD9 /* RGB */; 318 | targetProxy = B0157A311DB744A7006EDFD9 /* PBXContainerItemProxy */; 319 | }; 320 | B0157A3D1DB744A7006EDFD9 /* PBXTargetDependency */ = { 321 | isa = PBXTargetDependency; 322 | target = B0157A161DB744A7006EDFD9 /* RGB */; 323 | targetProxy = B0157A3C1DB744A7006EDFD9 /* PBXContainerItemProxy */; 324 | }; 325 | /* End PBXTargetDependency section */ 326 | 327 | /* Begin PBXVariantGroup section */ 328 | B0157A231DB744A7006EDFD9 /* Main.storyboard */ = { 329 | isa = PBXVariantGroup; 330 | children = ( 331 | B0157A241DB744A7006EDFD9 /* Base */, 332 | ); 333 | name = Main.storyboard; 334 | sourceTree = ""; 335 | }; 336 | B0157A281DB744A7006EDFD9 /* LaunchScreen.storyboard */ = { 337 | isa = PBXVariantGroup; 338 | children = ( 339 | B0157A291DB744A7006EDFD9 /* Base */, 340 | ); 341 | name = LaunchScreen.storyboard; 342 | sourceTree = ""; 343 | }; 344 | /* End PBXVariantGroup section */ 345 | 346 | /* Begin XCBuildConfiguration section */ 347 | B0157A421DB744A7006EDFD9 /* Debug */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | ALWAYS_SEARCH_USER_PATHS = NO; 351 | CLANG_ANALYZER_NONNULL = YES; 352 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 353 | CLANG_CXX_LIBRARY = "libc++"; 354 | CLANG_ENABLE_MODULES = YES; 355 | CLANG_ENABLE_OBJC_ARC = YES; 356 | CLANG_WARN_BOOL_CONVERSION = YES; 357 | CLANG_WARN_CONSTANT_CONVERSION = YES; 358 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 359 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 360 | CLANG_WARN_EMPTY_BODY = YES; 361 | CLANG_WARN_ENUM_CONVERSION = YES; 362 | CLANG_WARN_INFINITE_RECURSION = YES; 363 | CLANG_WARN_INT_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 366 | CLANG_WARN_UNREACHABLE_CODE = YES; 367 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 368 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 369 | COPY_PHASE_STRIP = NO; 370 | DEBUG_INFORMATION_FORMAT = dwarf; 371 | ENABLE_STRICT_OBJC_MSGSEND = YES; 372 | ENABLE_TESTABILITY = YES; 373 | GCC_C_LANGUAGE_STANDARD = gnu99; 374 | GCC_DYNAMIC_NO_PIC = NO; 375 | GCC_NO_COMMON_BLOCKS = YES; 376 | GCC_OPTIMIZATION_LEVEL = 0; 377 | GCC_PREPROCESSOR_DEFINITIONS = ( 378 | "DEBUG=1", 379 | "$(inherited)", 380 | ); 381 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 382 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 383 | GCC_WARN_UNDECLARED_SELECTOR = YES; 384 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 385 | GCC_WARN_UNUSED_FUNCTION = YES; 386 | GCC_WARN_UNUSED_VARIABLE = YES; 387 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 388 | MTL_ENABLE_DEBUG_INFO = YES; 389 | ONLY_ACTIVE_ARCH = YES; 390 | SDKROOT = iphoneos; 391 | }; 392 | name = Debug; 393 | }; 394 | B0157A431DB744A7006EDFD9 /* Release */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | ALWAYS_SEARCH_USER_PATHS = NO; 398 | CLANG_ANALYZER_NONNULL = YES; 399 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 400 | CLANG_CXX_LIBRARY = "libc++"; 401 | CLANG_ENABLE_MODULES = YES; 402 | CLANG_ENABLE_OBJC_ARC = YES; 403 | CLANG_WARN_BOOL_CONVERSION = YES; 404 | CLANG_WARN_CONSTANT_CONVERSION = YES; 405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 406 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 407 | CLANG_WARN_EMPTY_BODY = YES; 408 | CLANG_WARN_ENUM_CONVERSION = YES; 409 | CLANG_WARN_INFINITE_RECURSION = YES; 410 | CLANG_WARN_INT_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 416 | COPY_PHASE_STRIP = NO; 417 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 418 | ENABLE_NS_ASSERTIONS = NO; 419 | ENABLE_STRICT_OBJC_MSGSEND = YES; 420 | GCC_C_LANGUAGE_STANDARD = gnu99; 421 | GCC_NO_COMMON_BLOCKS = YES; 422 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 424 | GCC_WARN_UNDECLARED_SELECTOR = YES; 425 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 426 | GCC_WARN_UNUSED_FUNCTION = YES; 427 | GCC_WARN_UNUSED_VARIABLE = YES; 428 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 429 | MTL_ENABLE_DEBUG_INFO = NO; 430 | SDKROOT = iphoneos; 431 | VALIDATE_PRODUCT = YES; 432 | }; 433 | name = Release; 434 | }; 435 | B0157A451DB744A7006EDFD9 /* Debug */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | INFOPLIST_FILE = RGB/Info.plist; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 441 | PRODUCT_BUNDLE_IDENTIFIER = cn.roycms.RGB.RGB; 442 | PRODUCT_NAME = "$(TARGET_NAME)"; 443 | }; 444 | name = Debug; 445 | }; 446 | B0157A461DB744A7006EDFD9 /* Release */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 450 | INFOPLIST_FILE = RGB/Info.plist; 451 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 452 | PRODUCT_BUNDLE_IDENTIFIER = cn.roycms.RGB.RGB; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | }; 455 | name = Release; 456 | }; 457 | B0157A481DB744A7006EDFD9 /* Debug */ = { 458 | isa = XCBuildConfiguration; 459 | buildSettings = { 460 | BUNDLE_LOADER = "$(TEST_HOST)"; 461 | INFOPLIST_FILE = RGBTests/Info.plist; 462 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 463 | PRODUCT_BUNDLE_IDENTIFIER = cn.roycms.RGB.RGBTests; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RGB.app/RGB"; 466 | }; 467 | name = Debug; 468 | }; 469 | B0157A491DB744A7006EDFD9 /* Release */ = { 470 | isa = XCBuildConfiguration; 471 | buildSettings = { 472 | BUNDLE_LOADER = "$(TEST_HOST)"; 473 | INFOPLIST_FILE = RGBTests/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 475 | PRODUCT_BUNDLE_IDENTIFIER = cn.roycms.RGB.RGBTests; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RGB.app/RGB"; 478 | }; 479 | name = Release; 480 | }; 481 | B0157A4B1DB744A7006EDFD9 /* Debug */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | INFOPLIST_FILE = RGBUITests/Info.plist; 485 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 486 | PRODUCT_BUNDLE_IDENTIFIER = cn.roycms.RGB.RGBUITests; 487 | PRODUCT_NAME = "$(TARGET_NAME)"; 488 | TEST_TARGET_NAME = RGB; 489 | }; 490 | name = Debug; 491 | }; 492 | B0157A4C1DB744A7006EDFD9 /* Release */ = { 493 | isa = XCBuildConfiguration; 494 | buildSettings = { 495 | INFOPLIST_FILE = RGBUITests/Info.plist; 496 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 497 | PRODUCT_BUNDLE_IDENTIFIER = cn.roycms.RGB.RGBUITests; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | TEST_TARGET_NAME = RGB; 500 | }; 501 | name = Release; 502 | }; 503 | /* End XCBuildConfiguration section */ 504 | 505 | /* Begin XCConfigurationList section */ 506 | B0157A121DB744A6006EDFD9 /* Build configuration list for PBXProject "RGB" */ = { 507 | isa = XCConfigurationList; 508 | buildConfigurations = ( 509 | B0157A421DB744A7006EDFD9 /* Debug */, 510 | B0157A431DB744A7006EDFD9 /* Release */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | B0157A441DB744A7006EDFD9 /* Build configuration list for PBXNativeTarget "RGB" */ = { 516 | isa = XCConfigurationList; 517 | buildConfigurations = ( 518 | B0157A451DB744A7006EDFD9 /* Debug */, 519 | B0157A461DB744A7006EDFD9 /* Release */, 520 | ); 521 | defaultConfigurationIsVisible = 0; 522 | }; 523 | B0157A471DB744A7006EDFD9 /* Build configuration list for PBXNativeTarget "RGBTests" */ = { 524 | isa = XCConfigurationList; 525 | buildConfigurations = ( 526 | B0157A481DB744A7006EDFD9 /* Debug */, 527 | B0157A491DB744A7006EDFD9 /* Release */, 528 | ); 529 | defaultConfigurationIsVisible = 0; 530 | }; 531 | B0157A4A1DB744A7006EDFD9 /* Build configuration list for PBXNativeTarget "RGBUITests" */ = { 532 | isa = XCConfigurationList; 533 | buildConfigurations = ( 534 | B0157A4B1DB744A7006EDFD9 /* Debug */, 535 | B0157A4C1DB744A7006EDFD9 /* Release */, 536 | ); 537 | defaultConfigurationIsVisible = 0; 538 | }; 539 | /* End XCConfigurationList section */ 540 | }; 541 | rootObject = B0157A0F1DB744A6006EDFD9 /* Project object */; 542 | } 543 | -------------------------------------------------------------------------------- /RGB.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RGB.xcodeproj/xcuserdata/roy.xcuserdatad/xcschemes/RGB.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /RGB/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // RGB 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /RGB/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // RGB 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /RGB/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /RGB/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /RGB/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /RGB/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /RGB/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // RGB 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /RGB/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // RGB 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "RRGB.h" 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // [self.view setBackgroundColor:RGB(@"#1abc9d")]; 20 | [self.view setBackgroundColor:RGB16(0x1abc9d)]; 21 | // Do any additional setup after loading the view, typically from a nib. 22 | } 23 | 24 | 25 | - (void)didReceiveMemoryWarning { 26 | [super didReceiveMemoryWarning]; 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /RGB/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roycms/RGB/2b460668ec130d8be038e8aed49787814b08a31b/RGB/logo.png -------------------------------------------------------------------------------- /RGB/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RGB 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RGBClassess/RRGB.h: -------------------------------------------------------------------------------- 1 | // 2 | // RRGB.h 3 | // RGB 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #define RGB(rgbValue) [RRGB colorWithRGBFromString:(rgbValue)] 10 | #define RGB16(rgbValue) [RRGB colorWithRGB16:(rgbValue)] 11 | 12 | #import 13 | #import 14 | @interface RRGB : NSObject 15 | + (UIColor *)colorWithRGB16:(int)rgb; 16 | + (UIColor *)colorWithRGBFromString:(NSString *)rgb; 17 | @end 18 | -------------------------------------------------------------------------------- /RGBClassess/RRGB.m: -------------------------------------------------------------------------------- 1 | // 2 | // RRGB.m 3 | // RGB 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #import "RRGB.h" 10 | @implementation RRGB 11 | 12 | + (UIColor *)colorWithRGB16:(int)rgb { 13 | return [UIColor colorWithRed:((rgb & 0xFF0000) >> 16) / 255.0f 14 | green:((rgb & 0xFF00) >> 8) / 255.0f 15 | blue:((rgb & 0xFF)) / 255.0f 16 | alpha:1.0f]; 17 | } 18 | + (UIColor *)colorWithRGBFromString:(NSString *)rgb { 19 | if ([rgb rangeOfString:@"#"].location != NSNotFound) { 20 | rgb = [rgb substringFromIndex:1]; 21 | } 22 | rgb = [NSString stringWithFormat:@"0x%@",rgb]; 23 | unsigned long rgb16 = strtoul([rgb UTF8String],0,16); 24 | 25 | return [self colorWithRGB16:(int)rgb16]; 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /RGBTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /RGBTests/RGBTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // RGBTests.m 3 | // RGBTests 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RGBTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation RGBTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /RGBUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /RGBUITests/RGBUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // RGBUITests.m 3 | // RGBUITests 4 | // 5 | // Created by roycms on 2016/10/19. 6 | // Copyright © 2016年 roycms. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RGBUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation RGBUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roycms/RGB/2b460668ec130d8be038e8aed49787814b08a31b/images/arrow-down.png -------------------------------------------------------------------------------- /images/octocat-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roycms/RGB/2b460668ec130d8be038e8aed49787814b08a31b/images/octocat-small.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rgb by roycms 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 |
18 |
19 |

Rgb

20 |

IOS RGB UIColor

21 | 22 | 27 | 28 |

This project is maintained by roycms

29 | 30 | 31 |
32 |
33 |

Logo

34 | 35 |

36 | RGB

37 | 38 |

RGB color value to the UIColor conversion kit.

39 | 40 |

Shippable 41 | CocoaPods 42 | Packagist 43 | email

44 | 45 |

46 | Installation

47 | 48 |
    49 |
  • Import the main header file:#import "RRGB.h" 50 |
  • 51 |
52 | 53 |

54 | cocoapods

55 | 56 |

pod 'RGB'

57 | 58 |

59 | Use

60 | 61 |

return type UIColor

62 | 63 |
[self.view setBackgroundColor:RGB(@"#1abc9d")];
64 | [self.view setBackgroundColor:RGB16(0x1abc9d)];
65 | 66 |

67 | 期待

68 | 69 |
    70 |
  • 如果在使用过程中遇到BUG,希望你能Issues我,谢谢(或者尝试下载最新的框架代码看看BUG修复没有)
  • 71 |
  • 如果在使用过程中发现功能不够用,希望你能Issues我,我非常想为这个框架增加更多好用的功能,谢谢
  • 72 |
  • 如果你想为RAlertView输出代码,请拼命Pull Requests我
  • 73 |
74 |
75 | 78 |
79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /javascripts/scale.fix.js: -------------------------------------------------------------------------------- 1 | fixScale = function(doc) { 2 | 3 | var addEvent = 'addEventListener', 4 | type = 'gesturestart', 5 | qsa = 'querySelectorAll', 6 | scales = [1, 1], 7 | meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; 8 | 9 | function fix() { 10 | meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; 11 | doc.removeEventListener(type, fix, true); 12 | } 13 | 14 | if ((meta = meta[meta.length - 1]) && addEvent in doc) { 15 | fix(); 16 | scales = [.25, 1.6]; 17 | doc[addEvent](type, fix, true); 18 | } 19 | 20 | }; -------------------------------------------------------------------------------- /params.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Rgb", 3 | "tagline": "IOS RGB UIColor ", 4 | "body": " ![Logo](https://roycms.github.io/RGB/logo.png)\r\n RGB\r\n===\r\nRGB color value to the UIColor conversion kit.\r\n\r\n[![Shippable](https://img.shields.io/shippable/5444c5ecb904a4b21567b0ff.svg?maxAge=2592000?style=flat-square)](https://github.com/roycms/RAlertView)\r\n[![CocoaPods](https://img.shields.io/badge/pod-0.0.1-red.svg)](http://cocoapods.org/?q=RAlertView)\r\n[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg?maxAge=2592000?style=flat-square)](https://github.com/roycms/RAlertView/blob/master/LICENSE)\r\n[![email](https://img.shields.io/badge/%20email%20-%20roycms%40qq.com%20-yellowgreen.svg)](mailto:roycms@qq.com)\r\n\r\n## Installation\r\n- Import the main header file:`#import \"RRGB.h\"`\r\n\r\n## cocoapods \r\n` pod 'RGB' `\r\n\r\n## Use \r\nreturn type UIColor\r\n```objective-c\r\n[self.view setBackgroundColor:RGB(@\"#1abc9d\")];\r\n[self.view setBackgroundColor:RGB16(0x1abc9d)];\r\n```\r\n\r\n## 期待\r\n* 如果在使用过程中遇到BUG,希望你能Issues我,谢谢(或者尝试下载最新的框架代码看看BUG修复没有)\r\n* 如果在使用过程中发现功能不够用,希望你能Issues我,我非常想为这个框架增加更多好用的功能,谢谢\r\n* 如果你想为RAlertView输出代码,请拼命Pull Requests我\r\n", 5 | "note": "Don't delete this file! It's used internally to help with page regeneration." 6 | } -------------------------------------------------------------------------------- /stylesheets/github-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 GitHub, Inc. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | 24 | */ 25 | 26 | .pl-c /* comment */ { 27 | color: #969896; 28 | } 29 | 30 | .pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */, 31 | .pl-s .pl-v /* string variable */ { 32 | color: #0086b3; 33 | } 34 | 35 | .pl-e /* entity */, 36 | .pl-en /* entity.name */ { 37 | color: #795da3; 38 | } 39 | 40 | .pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */, 41 | .pl-s .pl-s1 /* string source */ { 42 | color: #333; 43 | } 44 | 45 | .pl-ent /* entity.name.tag */ { 46 | color: #63a35c; 47 | } 48 | 49 | .pl-k /* keyword, storage, storage.type */ { 50 | color: #a71d5d; 51 | } 52 | 53 | .pl-s /* string */, 54 | .pl-pds /* punctuation.definition.string, string.regexp.character-class */, 55 | .pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */, 56 | .pl-sr /* string.regexp */, 57 | .pl-sr .pl-cce /* string.regexp constant.character.escape */, 58 | .pl-sr .pl-sre /* string.regexp source.ruby.embedded */, 59 | .pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ { 60 | color: #183691; 61 | } 62 | 63 | .pl-v /* variable */ { 64 | color: #ed6a43; 65 | } 66 | 67 | .pl-id /* invalid.deprecated */ { 68 | color: #b52a1d; 69 | } 70 | 71 | .pl-ii /* invalid.illegal */ { 72 | color: #f8f8f8; 73 | background-color: #b52a1d; 74 | } 75 | 76 | .pl-sr .pl-cce /* string.regexp constant.character.escape */ { 77 | font-weight: bold; 78 | color: #63a35c; 79 | } 80 | 81 | .pl-ml /* markup.list */ { 82 | color: #693a17; 83 | } 84 | 85 | .pl-mh /* markup.heading */, 86 | .pl-mh .pl-en /* markup.heading entity.name */, 87 | .pl-ms /* meta.separator */ { 88 | font-weight: bold; 89 | color: #1d3e81; 90 | } 91 | 92 | .pl-mq /* markup.quote */ { 93 | color: #008080; 94 | } 95 | 96 | .pl-mi /* markup.italic */ { 97 | font-style: italic; 98 | color: #333; 99 | } 100 | 101 | .pl-mb /* markup.bold */ { 102 | font-weight: bold; 103 | color: #333; 104 | } 105 | 106 | .pl-md /* markup.deleted, meta.diff.header.from-file */ { 107 | color: #bd2c00; 108 | background-color: #ffecec; 109 | } 110 | 111 | .pl-mi1 /* markup.inserted, meta.diff.header.to-file */ { 112 | color: #55a532; 113 | background-color: #eaffea; 114 | } 115 | 116 | .pl-mdr /* meta.diff.range */ { 117 | font-weight: bold; 118 | color: #795da3; 119 | } 120 | 121 | .pl-mo /* meta.output */ { 122 | color: #1d3e81; 123 | } 124 | 125 | -------------------------------------------------------------------------------- /stylesheets/styles.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Arvo:400,700,400italic); 2 | 3 | /* MeyerWeb Reset */ 4 | 5 | html, body, div, span, applet, object, iframe, 6 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 7 | a, abbr, acronym, address, big, cite, code, 8 | del, dfn, em, img, ins, kbd, q, s, samp, 9 | small, strike, strong, sub, sup, tt, var, 10 | b, u, i, center, 11 | dl, dt, dd, ol, ul, li, 12 | fieldset, form, label, legend, 13 | table, caption, tbody, tfoot, thead, tr, th, td, 14 | article, aside, canvas, details, embed, 15 | figure, figcaption, footer, header, hgroup, 16 | menu, nav, output, ruby, section, summary, 17 | time, mark, audio, video { 18 | margin: 0; 19 | padding: 0; 20 | border: 0; 21 | font: inherit; 22 | vertical-align: baseline; 23 | } 24 | 25 | 26 | /* Base text styles */ 27 | 28 | body { 29 | padding:10px 50px 0 0; 30 | font-family:"Helvetica Neue", Helvetica, Arial, sans-serif; 31 | font-size: 14px; 32 | color: #232323; 33 | background-color: #FBFAF7; 34 | margin: 0; 35 | line-height: 1.8em; 36 | -webkit-font-smoothing: antialiased; 37 | 38 | } 39 | 40 | h1, h2, h3, h4, h5, h6 { 41 | color:#232323; 42 | margin:36px 0 10px; 43 | } 44 | 45 | p, ul, ol, table, dl { 46 | margin:0 0 22px; 47 | } 48 | 49 | h1, h2, h3 { 50 | font-family: Arvo, Monaco, serif; 51 | line-height:1.3; 52 | font-weight: normal; 53 | } 54 | 55 | h1,h2, h3 { 56 | display: block; 57 | border-bottom: 1px solid #ccc; 58 | padding-bottom: 5px; 59 | } 60 | 61 | h1 { 62 | font-size: 30px; 63 | } 64 | 65 | h2 { 66 | font-size: 24px; 67 | } 68 | 69 | h3 { 70 | font-size: 18px; 71 | } 72 | 73 | h4, h5, h6 { 74 | font-family: Arvo, Monaco, serif; 75 | font-weight: 700; 76 | } 77 | 78 | a { 79 | color:#C30000; 80 | font-weight:200; 81 | text-decoration:none; 82 | } 83 | 84 | a:hover { 85 | text-decoration: underline; 86 | } 87 | 88 | a small { 89 | font-size: 12px; 90 | } 91 | 92 | em { 93 | font-style: italic; 94 | } 95 | 96 | strong { 97 | font-weight:700; 98 | } 99 | 100 | ul { 101 | list-style-position: inside; 102 | list-style: disc; 103 | padding-left: 25px; 104 | } 105 | 106 | ol { 107 | list-style-position: inside; 108 | list-style: decimal; 109 | padding-left: 25px; 110 | } 111 | 112 | blockquote { 113 | margin: 0; 114 | padding: 0 0 0 20px; 115 | font-style: italic; 116 | } 117 | 118 | dl, dt, dd, dl p { 119 | font-color: #444; 120 | } 121 | 122 | dl dt { 123 | font-weight: bold; 124 | } 125 | 126 | dl dd { 127 | padding-left: 20px; 128 | font-style: italic; 129 | } 130 | 131 | dl p { 132 | padding-left: 20px; 133 | font-style: italic; 134 | } 135 | 136 | hr { 137 | border:0; 138 | background:#ccc; 139 | height:1px; 140 | margin:0 0 24px; 141 | } 142 | 143 | /* Images */ 144 | 145 | img { 146 | position: relative; 147 | margin: 0 auto; 148 | max-width: 650px; 149 | padding: 5px; 150 | margin: 10px 0 32px 0; 151 | border: 1px solid #ccc; 152 | } 153 | 154 | p img { 155 | display: inline; 156 | margin: 0; 157 | padding: 0; 158 | vertical-align: middle; 159 | text-align: center; 160 | border: none; 161 | } 162 | 163 | /* Code blocks */ 164 | 165 | code, pre { 166 | font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; 167 | color:#000; 168 | font-size:14px; 169 | } 170 | 171 | pre { 172 | padding: 4px 12px; 173 | background: #FDFEFB; 174 | border-radius:4px; 175 | border:1px solid #D7D8C8; 176 | overflow: auto; 177 | overflow-y: hidden; 178 | margin-bottom: 32px; 179 | } 180 | 181 | 182 | /* Tables */ 183 | 184 | table { 185 | width:100%; 186 | } 187 | 188 | table { 189 | border: 1px solid #ccc; 190 | margin-bottom: 32px; 191 | text-align: left; 192 | } 193 | 194 | th { 195 | font-family: 'Arvo', Helvetica, Arial, sans-serif; 196 | font-size: 18px; 197 | font-weight: normal; 198 | padding: 10px; 199 | background: #232323; 200 | color: #FDFEFB; 201 | } 202 | 203 | td { 204 | padding: 10px; 205 | background: #ccc; 206 | } 207 | 208 | 209 | /* Wrapper */ 210 | .wrapper { 211 | width:960px; 212 | } 213 | 214 | 215 | /* Header */ 216 | 217 | header { 218 | background-color: #171717; 219 | color: #FDFDFB; 220 | width:170px; 221 | float:left; 222 | position:fixed; 223 | border: 1px solid #000; 224 | -webkit-border-top-right-radius: 4px; 225 | -webkit-border-bottom-right-radius: 4px; 226 | -moz-border-radius-topright: 4px; 227 | -moz-border-radius-bottomright: 4px; 228 | border-top-right-radius: 4px; 229 | border-bottom-right-radius: 4px; 230 | padding: 34px 25px 22px 50px; 231 | margin: 30px 25px 0 0; 232 | -webkit-font-smoothing: antialiased; 233 | } 234 | 235 | p.header { 236 | font-size: 16px; 237 | } 238 | 239 | h1.header { 240 | font-family: Arvo, sans-serif; 241 | font-size: 30px; 242 | font-weight: 300; 243 | line-height: 1.3em; 244 | border-bottom: none; 245 | margin-top: 0; 246 | } 247 | 248 | 249 | h1.header, a.header, a.name, header a{ 250 | color: #fff; 251 | } 252 | 253 | a.header { 254 | text-decoration: underline; 255 | } 256 | 257 | a.name { 258 | white-space: nowrap; 259 | } 260 | 261 | header ul { 262 | list-style:none; 263 | padding:0; 264 | } 265 | 266 | header li { 267 | list-style-type: none; 268 | width:132px; 269 | height:15px; 270 | margin-bottom: 12px; 271 | line-height: 1em; 272 | padding: 6px 6px 6px 7px; 273 | 274 | background: #AF0011; 275 | background: -moz-linear-gradient(top, #AF0011 0%, #820011 100%); 276 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); 277 | background: -webkit-linear-gradient(top, #AF0011 0%,#820011 100%); 278 | background: -o-linear-gradient(top, #AF0011 0%,#820011 100%); 279 | background: -ms-linear-gradient(top, #AF0011 0%,#820011 100%); 280 | background: linear-gradient(top, #AF0011 0%,#820011 100%); 281 | 282 | border-radius:4px; 283 | border:1px solid #0D0D0D; 284 | 285 | -webkit-box-shadow: inset 0px 1px 1px 0 rgba(233,2,38, 1); 286 | box-shadow: inset 0px 1px 1px 0 rgba(233,2,38, 1); 287 | 288 | } 289 | 290 | header li:hover { 291 | background: #C3001D; 292 | background: -moz-linear-gradient(top, #C3001D 0%, #950119 100%); 293 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); 294 | background: -webkit-linear-gradient(top, #C3001D 0%,#950119 100%); 295 | background: -o-linear-gradient(top, #C3001D 0%,#950119 100%); 296 | background: -ms-linear-gradient(top, #C3001D 0%,#950119 100%); 297 | background: linear-gradient(top, #C3001D 0%,#950119 100%); 298 | } 299 | 300 | a.buttons { 301 | -webkit-font-smoothing: antialiased; 302 | background: url(../images/arrow-down.png) no-repeat; 303 | font-weight: normal; 304 | text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0; 305 | padding: 2px 2px 2px 22px; 306 | height: 30px; 307 | } 308 | 309 | a.github { 310 | background: url(../images/octocat-small.png) no-repeat 1px; 311 | } 312 | 313 | a.buttons:hover { 314 | color: #fff; 315 | text-decoration: none; 316 | } 317 | 318 | 319 | /* Section - for main page content */ 320 | 321 | section { 322 | width:650px; 323 | float:right; 324 | padding-bottom:50px; 325 | } 326 | 327 | 328 | /* Footer */ 329 | 330 | footer { 331 | width:170px; 332 | float:left; 333 | position:fixed; 334 | bottom:10px; 335 | padding-left: 50px; 336 | } 337 | 338 | @media print, screen and (max-width: 960px) { 339 | 340 | div.wrapper { 341 | width:auto; 342 | margin:0; 343 | } 344 | 345 | header, section, footer { 346 | float:none; 347 | position:static; 348 | width:auto; 349 | } 350 | 351 | footer { 352 | border-top: 1px solid #ccc; 353 | margin:0 84px 0 50px; 354 | padding:0; 355 | } 356 | 357 | header { 358 | padding-right:320px; 359 | } 360 | 361 | section { 362 | padding:20px 84px 20px 50px; 363 | margin:0 0 20px; 364 | } 365 | 366 | header a small { 367 | display:inline; 368 | } 369 | 370 | header ul { 371 | position:absolute; 372 | right:130px; 373 | top:84px; 374 | } 375 | } 376 | 377 | @media print, screen and (max-width: 720px) { 378 | body { 379 | word-wrap:break-word; 380 | } 381 | 382 | header { 383 | padding:10px 20px 0; 384 | margin-right: 0; 385 | } 386 | 387 | section { 388 | padding:10px 0 10px 20px; 389 | margin:0 0 30px; 390 | } 391 | 392 | footer { 393 | margin: 0 0 0 30px; 394 | } 395 | 396 | header ul, header p.view { 397 | position:static; 398 | } 399 | } 400 | 401 | @media print, screen and (max-width: 480px) { 402 | 403 | header ul li.download { 404 | display:none; 405 | } 406 | 407 | footer { 408 | margin: 0 0 0 20px; 409 | } 410 | 411 | footer a{ 412 | display:block; 413 | } 414 | 415 | } 416 | 417 | @media print { 418 | body { 419 | padding:0.4in; 420 | font-size:12pt; 421 | color:#444; 422 | } 423 | } --------------------------------------------------------------------------------