You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.
I have a .clr files for my iOS project which contains color in sRGB color space (which is used by iOS). But SwiftGen converts these color into NSCalibratedColorSpace (which I believe is called Generic RGB in the color panel) before generating the code which is not what I want. So, are there any reasons SwiftGen has to convert the color to NSCalibratedColorSpace before generating the code. And can we add an option to convert it to other color space/profile like "sRGB IEC61966-2.1"?
The text was updated successfully, but these errors were encountered:
Aha, I've hit the same issue, but never had the time to look into it. Colors from JSON don't have this problem, but those don't have colorspace information.
I wonder what the best solution would be?
Always convert to sRGB IEC61966-2.1 if it isn't yet --> I know that's the default one for iOS, but what about the other platforms
Parse the color space information and provide it to the template --> Use the correct initializer
I think we should just parse the values as-is without converting it to any color space. iOS developers will probably have .clr files in sRGB while macOS developers will have it in Generic RGB. Then SwiftGen will convert them to the right ones for the platform depending on the .clr that were passed to it. And the color code in the palettes file will match the generated code which is the expected behavior.
And I just tested it, even if you have mixed color spaces in a .clr file, it will give the same color code as in the file if you don't convert it to any color space after.
I have a .clr files for my iOS project which contains color in sRGB color space (which is used by iOS). But SwiftGen converts these color into
NSCalibratedColorSpace
(which I believe is called Generic RGB in the color panel) before generating the code which is not what I want. So, are there any reasons SwiftGen has to convert the color to NSCalibratedColorSpace before generating the code. And can we add an option to convert it to other color space/profile like "sRGB IEC61966-2.1"?The text was updated successfully, but these errors were encountered: