UIColor-uiGradientsAdditions

https://github.com/kaiinui/UIColor-uiGradientsAdditions

Beautiful colors from http://uigradients.com/

优雅的渐变色效果,来自于 http://uigradients.com/

Usage

UIColor *startColor = [UIColor uig_emeraldWaterStartColor];
UIColor *endColor = [UIColor uig_emeraldWaterEndColor]; CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = view.bounds;
gradient.startPoint = CGPointMake(0, 0);
gradient.endPoint = CGPointMake(view.frame.size.width, 0);
gradient.colors = @[(id)[startColor CGColor], (id)[endColor CGColor], nil]; [view.layer insertSublayer:gradient atIndex:0];

You can pick a color from various preset colors!

你可以从这些预设的渐变色中挑选出你喜欢的!

Installation

pod 'UIColor+uiGradients'

To inspect colors, I recommend to use ColorSense-for-Xcode.

Or see http://uigradients.com/

用pod直接安装'UIColor+uiGradients'

为了实时体验不同颜色,我建议使用插件 ColorSense-for-Xcode.或者从网站 http://uigradients.com/ 查看对应的效果。

The list of colors

# pragma mark - Emerald Water

+ (UIColor *)uig_emeraldWaterStartColor;
+ (UIColor *)uig_emeraldWaterEndColor; # pragma mark - Lemon Twist + (UIColor *)uig_lemonTwistStartColor;
+ (UIColor *)uig_lemonTwistEndColor; # pragma mark - Horizon + (UIColor *)uig_horizonStartColor;
+ (UIColor *)uig_horizonEndColor; # pragma mark - Rose Water + (UIColor *)uig_roseWaterStartColor;
+ (UIColor *)uig_roseWaterEndColor; # pragma mark - Frozen + (UIColor *)uig_frozenStartColor;
+ (UIColor *)uig_frozenEndColor; # pragma mark - Mango Pulp + (UIColor *)uig_mangoPulpStartColor;
+ (UIColor *)uig_mangoPulpEndColor; # pragma mark - Bloody Mary + (UIColor *)uig_bloodyMaryStartColor;
+ (UIColor *)uig_bloodyMaryEndColor; # pragma mark - Aubergine + (UIColor *)uig_aubergineStartColor;
+ (UIColor *)uig_aubergineEndColor; # pragma mark - Aqua Marine + (UIColor *)uig_aquaMarineStartColor;
+ (UIColor *)uig_aquaMarineEndColor; # pragma mark - Sunrise + (UIColor *)uig_sunriseStartColor;
+ (UIColor *)uig_sunriseEndColor; # pragma mark - Purple Paradise + (UIColor *)uig_purpleParadiseStartColor;
+ (UIColor *)uig_purpleParadiseEndColor; # pragma mark - Sea Weed + (UIColor *)uig_seaWeedStartColor;
+ (UIColor *)uig_seaWeedEndColor; # pragma mark - Pinky + (UIColor *)uig_pinkyStartColor;
+ (UIColor *)uig_pinkyEndColor; # pragma mark - Cherry + (UIColor *)uig_cherryStartColor;
+ (UIColor *)uig_cherryEndColor; # pragma mark - Mojito + (UIColor *)uig_mojitoStartColor;
+ (UIColor *)uig_mojitoEndColor; # pragma mark - Juicy Orange + (UIColor *)uig_juicyOrangeStartColor;
+ (UIColor *)uig_juicyOrangeEndColor; # pragma mark - Mirage + (UIColor *)uig_mirageStartColor;
+ (UIColor *)uig_mirageEndColor; # pragma mark - Steel Gray + (UIColor *)uig_steelGrayStartColor;
+ (UIColor *)uig_steelGrayEndColor; # pragma mark - Kashmir + (UIColor *)uig_kashmirStartColor;
+ (UIColor *)uig_kashmirEndColor; # pragma mark - Electric Violet + (UIColor *)uig_electricVioletStartColor;
+ (UIColor *)uig_electricVioletEndColor; # pragma mark - Venice Blue + (UIColor *)uig_veniceBlueStartColor;
+ (UIColor *)uig_veniceBlueEndColor; # pragma mark - Bora Bora + (UIColor *)uig_boraBoraStartColor;
+ (UIColor *)uig_boraBoraEndColor; # pragma mark - Moss + (UIColor *)uig_mossStartColor;
+ (UIColor *)uig_mossEndColor; # pragma mark - Shroom Haze + (UIColor *)uig_shroomHazeStartColor;
+ (UIColor *)uig_shroomHazeEndColor; # pragma mark - Mystic + (UIColor *)uig_mysticStartColor;
+ (UIColor *)uig_mysticEndColor; # pragma mark - Midnight City + (UIColor *)uig_midnightCityStartColor;
+ (UIColor *)uig_midnightCityEndColor; # pragma mark - Sea Blizz + (UIColor *)uig_seaBlizzStartColor;
+ (UIColor *)uig_seaBlizzEndColor; # pragma mark - Opa + (UIColor *)uig_opaStartColor;
+ (UIColor *)uig_opaEndColor; # pragma mark - Titanium + (UIColor *)uig_titaniumStartColor;
+ (UIColor *)uig_titaniumEndColor; # pragma mark - Mantle + (UIColor *)uig_mantleStartColor;
+ (UIColor *)uig_mantleEndColor; # pragma mark - Dracula + (UIColor *)uig_draculaStartColor;
+ (UIColor *)uig_draculaEndColor; # pragma mark - Peach + (UIColor *)uig_peachStartColor;
+ (UIColor *)uig_peachEndColor; # pragma mark - Moonrise + (UIColor *)uig_moonriseStartColor;
+ (UIColor *)uig_moonriseEndColor; # pragma mark - Clouds + (UIColor *)uig_cloudsStartColor;
+ (UIColor *)uig_cloudsEndColor; # pragma mark - Stellar + (UIColor *)uig_stellarStartColor;
+ (UIColor *)uig_stellarEndColor; # pragma mark - Bourbon + (UIColor *)uig_bourbonStartColor;
+ (UIColor *)uig_bourbonEndColor; # pragma mark - Calm Darya + (UIColor *)uig_calmDaryaStartColor;
+ (UIColor *)uig_calmDaryaEndColor; # pragma mark - Influenza + (UIColor *)uig_influenzaStartColor;
+ (UIColor *)uig_influenzaEndColor; # pragma mark - Shrimpy + (UIColor *)uig_shrimpyStartColor;
+ (UIColor *)uig_shrimpyEndColor; # pragma mark - Army + (UIColor *)uig_armyStartColor;
+ (UIColor *)uig_armyEndColor; # pragma mark - Miaka + (UIColor *)uig_miakaStartColor;
+ (UIColor *)uig_miakaEndColor; # pragma mark - Pinot Noir + (UIColor *)uig_pinotNoirStartColor;
+ (UIColor *)uig_pinotNoirEndColor; # pragma mark - Day Tripper + (UIColor *)uig_dayTripperStartColor;
+ (UIColor *)uig_dayTripperEndColor; # pragma mark - Namn + (UIColor *)uig_namnStartColor;
+ (UIColor *)uig_namnEndColor; # pragma mark - Blurry Beach + (UIColor *)uig_blurryBeachStartColor;
+ (UIColor *)uig_blurryBeachEndColor; # pragma mark - Vasily + (UIColor *)uig_vasilyStartColor;
+ (UIColor *)uig_vasilyEndColor; # pragma mark - A Lost Memory + (UIColor *)uig_aLostMemoryStartColor;
+ (UIColor *)uig_aLostMemoryEndColor; # pragma mark - Petrichor + (UIColor *)uig_petrichorStartColor;
+ (UIColor *)uig_petrichorEndColor; # pragma mark - Jonquil + (UIColor *)uig_jonquilStartColor;
+ (UIColor *)uig_jonquilEndColor; # pragma mark - Sirius Tamed + (UIColor *)uig_siriusTamedStartColor;
+ (UIColor *)uig_siriusTamedEndColor; # pragma mark - Kyoto + (UIColor *)uig_kyotoStartColor;
+ (UIColor *)uig_kyotoEndColor; # pragma mark - Misty Meadow + (UIColor *)uig_mistyMeadowStartColor;
+ (UIColor *)uig_mistyMeadowEndColor; # pragma mark - Aqualicious + (UIColor *)uig_aqualiciousStartColor;
+ (UIColor *)uig_aqualiciousEndColor; # pragma mark - Moor + (UIColor *)uig_moorStartColor;
+ (UIColor *)uig_moorEndColor; # pragma mark - Almost + (UIColor *)uig_almostStartColor;
+ (UIColor *)uig_almostEndColor; # pragma mark - Forever Lost + (UIColor *)uig_foreverLostStartColor;
+ (UIColor *)uig_foreverLostEndColor; # pragma mark - Winter + (UIColor *)uig_winterStartColor;
+ (UIColor *)uig_winterEndColor; # pragma mark - Autumn + (UIColor *)uig_autumnStartColor;
+ (UIColor *)uig_autumnEndColor; # pragma mark - Candy + (UIColor *)uig_candyStartColor;
+ (UIColor *)uig_candyEndColor; # pragma mark - Reef + (UIColor *)uig_reefStartColor;
+ (UIColor *)uig_reefEndColor; # pragma mark - The Strain + (UIColor *)uig_theStrainStartColor;
+ (UIColor *)uig_theStrainEndColor; # pragma mark - Dirty Fog + (UIColor *)uig_dirtyFogStartColor;
+ (UIColor *)uig_dirtyFogEndColor; # pragma mark - Earthly + (UIColor *)uig_earthlyStartColor;
+ (UIColor *)uig_earthlyEndColor; # pragma mark - Virgin + (UIColor *)uig_virginStartColor;
+ (UIColor *)uig_virginEndColor; # pragma mark - Ash + (UIColor *)uig_ashStartColor;
+ (UIColor *)uig_ashEndColor; # pragma mark - Shadow Night + (UIColor *)uig_shadowNightStartColor;
+ (UIColor *)uig_shadowNightEndColor; # pragma mark - Cherryblossoms + (UIColor *)uig_cherryblossomsStartColor;
+ (UIColor *)uig_cherryblossomsEndColor; # pragma mark - Parklife + (UIColor *)uig_parklifeStartColor;
+ (UIColor *)uig_parklifeEndColor; # pragma mark - Dance To Forget + (UIColor *)uig_danceToForgetStartColor;
+ (UIColor *)uig_danceToForgetEndColor; # pragma mark - Starfall + (UIColor *)uig_starfallStartColor;
+ (UIColor *)uig_starfallEndColor; # pragma mark - Red Mist + (UIColor *)uig_redMistStartColor;
+ (UIColor *)uig_redMistEndColor; # pragma mark - Teal Love + (UIColor *)uig_tealLoveStartColor;
+ (UIColor *)uig_tealLoveEndColor; # pragma mark - Neon Life + (UIColor *)uig_neonLifeStartColor;
+ (UIColor *)uig_neonLifeEndColor; # pragma mark - Man of Steel + (UIColor *)uig_manofSteelStartColor;
+ (UIColor *)uig_manofSteelEndColor; # pragma mark - Amethyst + (UIColor *)uig_amethystStartColor;
+ (UIColor *)uig_amethystEndColor; # pragma mark - Cheer Up Emo Kid + (UIColor *)uig_cheerUpEmoKidStartColor;
+ (UIColor *)uig_cheerUpEmoKidEndColor; # pragma mark - Shore + (UIColor *)uig_shoreStartColor;
+ (UIColor *)uig_shoreEndColor; # pragma mark - Facebook Messenger + (UIColor *)uig_facebookMessengerStartColor;
+ (UIColor *)uig_facebookMessengerEndColor; # pragma mark - SoundCloud + (UIColor *)uig_soundCloudStartColor;
+ (UIColor *)uig_soundCloudEndColor; # pragma mark - Behongo + (UIColor *)uig_behongoStartColor;
+ (UIColor *)uig_behongoEndColor;

Build latest one

Just clone and

curl https://raw.githubusercontent.com/Ghosh/uiGradients/master/gradients.json | ruby parse.rb

LICENSE

I do not claim any rights about the code. See https://github.com/Ghosh/uiGradients for LICENSE information. (uiGradients is MIT License!)

[翻译] UIColor-uiGradientsAdditions的更多相关文章

  1. [iOS翻译]《iOS 7 Programming Cookbook》:iOS文件与文件夹管理(上)

    简介: iOS基于OS X,而OSX本身基于Unix操作系统.在iOS里面,操作系统的完全路径结构是不可见的,因为每个APP的数据都存储自身的沙盒里面.沙盒环境实际上听起来像这样:一个只允许当前APP ...

  2. Objective-C 编程艺术 (Zen and the Art of the Objective-C Craftsmanship 中文翻译)

    # 禅与 Objective-C 编程艺术 (Zen and the Art of the Objective-C Craftsmanship 中文翻译) - 原文 <https://githu ...

  3. Animated progress view with CAGradientLayer(带翻译)

    Animated progress view with CAGradientLayer(带翻译)  Modern software design is getting flatter and thin ...

  4. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  5. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  6. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  7. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  8. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  9. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  10. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

随机推荐

  1. 笔记三:python乱码深度剖析一

    一:学习内容 python编码转换 python乱码原因深入解析 二:python编码转换 1. Python内部字符串一般都是Unicode编码,代码中字符串的默认编码与代码文件本身的编码是一致的. ...

  2. 关于 AXI协议的学习解释说明

    AXI(Advanced eXtensible Interface)是一种总线协议,该协议是ARM公司提出的AMBA(Advanced Microcontroller Bus Architecture ...

  3. java.lang.NoSuchMethodError: org.json.JSONArray.iterator()Ljava/util/Iterator 阿里云短信

    请尝试使用 <dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk ...

  4. Mongodb同步数据到hive(二)

    Mongodb同步数据到hive(二) 1.            概述 上一篇文章主要介绍了mongodb-based,通过直连mongodb的方式进行数据映射来进行数据查询,但是那种方式会对线上的 ...

  5. c# combobox控件的使用

    POJO: class ComboBoxItem { string _text; string _value; public string Text { get { return _text; } s ...

  6. [转]How can I list all foreign keys referencing a given table in SQL Server?

    本文转自:https://stackoverflow.com/questions/483193/how-can-i-list-all-foreign-keys-referencing-a-given- ...

  7. ASPxGridView行的选中和行的焦点

    <SettingsBehavior AllowFocusedRow="true" /> 行的焦点,行的点击以及Command列按钮点击可以得到焦点 Styles-Foc ...

  8. SQL存储过程基础语法及实例

    1.定义变量简单赋值 declare @a int //声明一个变量a 赋初值为5 print @a //输出变量a 2.创建临时表 if OBJECT_ID('tempdb.#FlightState ...

  9. Directory文件类

    创建一个新文件 Directory.CreateDirectory(@"C: \Users\enle\Desktop\new");//路径 Console.WriteLine(&q ...

  10. 撰写html标签的快捷方式1

    一: <ul> <li><a href=""></a></li></ul> 如果要写上面的标签,直接写 ul ...