iPhone開発のメモです。import <Foundation/Foundation.h> @interface UIColor (Hex) - (UIColor *) initWithHex:(NSString *)hexString alpha:(CGFloat)alpha; @end @implementation UIColor (Hex) - (UIColor *) initWithHex:(NSString *)string alpha:(CGFloat)alpha { UIColor *color = nil; if (string && [string length] == 7) { NSString *colorString = [NSString stringWithFormat: @"0x%@ 0x%@ 0x%@", [string substringWithRan