V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
bigwang
V2EX  ›  iDev

UIColor 取色器,自动生成代码

  •  
  •   bigwang · 2012-09-13 19:32:56 +08:00 · 4047 次点击
    这是一个创建于 4235 天前的主题,其中的信息可能已经有所发展或是发生改变。
    6 条回复    1970-01-01 08:00:00 +08:00
    Air_Mu
        1
    Air_Mu  
       2012-09-13 19:45:12 +08:00
    bigwang
        2
    bigwang  
    OP
       2012-09-13 19:46:38 +08:00
    @Air_Mu 这网站好复杂啊
    chrisyipw
        3
    chrisyipw  
       2012-09-13 20:27:30 +08:00
    fmfsaisai
        4
    fmfsaisai  
       2012-09-13 22:18:52 +08:00
    #define UIColorFromRGB(rgbValue) [UIColor
    colorWithRed:(((float)((rgbValue & 0xFF0000) >> 16))/255.0)
    green:(((float)((rgbValue & 0xFF00) >> 8))/255.0)
    blue:(((float)(rgbValue & 0xFF))/255.0) alpha:1.0]

    UIColor *color = UIColorFromRGB(0x800080);


    ....
    bigwang
        5
    bigwang  
    OP
       2012-09-13 22:40:44 +08:00
    @fmfsaisai
    我也用过这个宏,主要是 手工填rgb值不够直观
    fmfsaisai
        6
    fmfsaisai  
       2012-09-14 10:35:03 +08:00
    @bigwang 我的意思是,如果要取色,16进制RGB是最通用的,想要找,哪里都是一大片。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   944 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:57 · PVG 04:57 · LAX 13:57 · JFK 16:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.