Photoshop: Ability to exporting project colors into objective-C subclass for iOS

  • 1
  • Idea
  • Updated 3 years ago
  • (Edited)
Hi, I am using Photoshop for iOS apps development and the way I have to deal with color management is a bit incompatible.

They all have to be written down in RGB and HEX (for web) and shared with the team. If there would be simpler solution such as exporting all colors used in project even directly in Objective-C subclass, that would speed up the development time and keeping reference point for the whole project

Objective-C Subclass header file:


@interface UIColor (Blnz)

+ (UIColor*)darkScrollColor;
+ (UIColor*)scrollColor;
+ (UIColor*)lightScrollColor;
+ (UIColor*)darkGreenColor;
+ (UIColor*)darkGreenChartColor;
+ (UIColor*)blnzColor;


Objective-C Subclass implementation file:

#import "ProjectColors.h"

@implementation UIColor (Blnz)

+ (UIColor*)darkScrollColor {
return [UIColor colorWithRed:194.0/255.0 green:60.0/255.0 blue:159.0/255.0 alpha:1];
+ (UIColor*)scrollColor {
return [UIColor colorWithRed:220.0/255.0 green:210.0/255.0 blue:75.0/255.0 alpha:1];
+ (UIColor*)lightScrollColor {
return [UIColor colorWithRed:228.0/255.0 green:43.0/255.0 blue:180.0/255.0 alpha:1];
+ (UIColor*)darkGreenColor {
return [UIColor colorWithRed:44.0/255.0 green:70.0/255.0 blue:2.0/255.0 alpha:1];
+ (UIColor*)darkGreenChartColor{
return [UIColor colorWithRed:25.0f/255.0f green:40.0f/255.0f blue:0.0f/255.0f alpha:1];
+ (UIColor*)blnzColor{
return [UIColor colorWithRed:91.0f/255.0f green:136.0f/255.0f blue:15.0f/255.0f alpha:1];


Thank you for considering and by the way, the app "Device Preview" for iOS is brilliant!

Kind regards
Photo of ales olasz

ales olasz

  • 2 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 13635 Posts
  • 1546 Reply Likes
Couple of ideas.

1) You can copy layer properties as CSS. Context click on a layer or group, and choose Copy CSS
2) You could probably hack Generator to format it in whatever format/subclass you want. More on Generator:
Photo of ales olasz

ales olasz

  • 2 Posts
  • 0 Reply Likes
Thank you for the reply. The CSS solution isn't working, it does not pick up any color property, it renders image from the layer and sets it as 'background-image'

.Layer_2 {
background-image: url("Layer 2.png");
position: absolute;
left: 79px;
top: 178px;
width: 328px;
height: 90px;
z-index: 2;

I am not skilled enough to hack the Generator from GitHub either. Thank you for considering