When exporting image from Sketch, why does the color slightly changes?
If I configure an asset in Sketch with color #00EDC7 (for example), export it in PDF (or PNG):
Then I go in Xcode, then I create the image in the interface editor, create a view component, settings its background color to #00EDC7 => the color will be different that my exported image.
Then if I use the Xcode color picker and I pick the exported asset color, the color found will be #6CE8C8
Why? Color configuration? How to configure Sketch to avoid this?
colors xcode
add a comment |
If I configure an asset in Sketch with color #00EDC7 (for example), export it in PDF (or PNG):
Then I go in Xcode, then I create the image in the interface editor, create a view component, settings its background color to #00EDC7 => the color will be different that my exported image.
Then if I use the Xcode color picker and I pick the exported asset color, the color found will be #6CE8C8
Why? Color configuration? How to configure Sketch to avoid this?
colors xcode
1
ICC / colour profiles would be my first guess
– grawity
Jan 15 at 11:27
Interesting. I tried to change Sketch color profiles toDisplay P3
, the one Xcode uses, and now i'm having almost the same color. But instead #00EDC7, the generated asset has #6EEDC7! Very strange...
– Martin
Jan 16 at 9:12
add a comment |
If I configure an asset in Sketch with color #00EDC7 (for example), export it in PDF (or PNG):
Then I go in Xcode, then I create the image in the interface editor, create a view component, settings its background color to #00EDC7 => the color will be different that my exported image.
Then if I use the Xcode color picker and I pick the exported asset color, the color found will be #6CE8C8
Why? Color configuration? How to configure Sketch to avoid this?
colors xcode
If I configure an asset in Sketch with color #00EDC7 (for example), export it in PDF (or PNG):
Then I go in Xcode, then I create the image in the interface editor, create a view component, settings its background color to #00EDC7 => the color will be different that my exported image.
Then if I use the Xcode color picker and I pick the exported asset color, the color found will be #6CE8C8
Why? Color configuration? How to configure Sketch to avoid this?
colors xcode
colors xcode
asked Jan 15 at 11:08
MartinMartin
1085
1085
1
ICC / colour profiles would be my first guess
– grawity
Jan 15 at 11:27
Interesting. I tried to change Sketch color profiles toDisplay P3
, the one Xcode uses, and now i'm having almost the same color. But instead #00EDC7, the generated asset has #6EEDC7! Very strange...
– Martin
Jan 16 at 9:12
add a comment |
1
ICC / colour profiles would be my first guess
– grawity
Jan 15 at 11:27
Interesting. I tried to change Sketch color profiles toDisplay P3
, the one Xcode uses, and now i'm having almost the same color. But instead #00EDC7, the generated asset has #6EEDC7! Very strange...
– Martin
Jan 16 at 9:12
1
1
ICC / colour profiles would be my first guess
– grawity
Jan 15 at 11:27
ICC / colour profiles would be my first guess
– grawity
Jan 15 at 11:27
Interesting. I tried to change Sketch color profiles to
Display P3
, the one Xcode uses, and now i'm having almost the same color. But instead #00EDC7, the generated asset has #6EEDC7! Very strange...– Martin
Jan 16 at 9:12
Interesting. I tried to change Sketch color profiles to
Display P3
, the one Xcode uses, and now i'm having almost the same color. But instead #00EDC7, the generated asset has #6EEDC7! Very strange...– Martin
Jan 16 at 9:12
add a comment |
1 Answer
1
active
oldest
votes
What you are seeing in Xcode is your exported graphic (which appears to have an sRGB ICC profile) rendered in the Display P3 colorspace. The color appears darker in the graphic compared to using the same RGB numeric values because sRGB has a narrower color gamut. In other words, its range of values from 0-255 map to a subset of Display P3's values. Also note that conversions aren't necessarily linear. 0, 0, 0 in sRGB is going to convert to 0, 0, 0 in Display P3 while, obviously, the red and blue values from your color had to map differently to show the same perceptual color.
I don't work in Sketch so I can't say whether it allows you to export a graphic with an ICC profile (sRGB, Display P3). However, in Xcode's custom color picker you can click on the settings icon and choose the color space in which you want to define a color:
This will at least allow you to match colors if your exporting application only supports sRGB. If you can export an asset as a 16-bit, Display P3 PNG or as a vector PDF with an embedded ICC profile, then you can work in Display P3 in both. In that case, you'd change the custom color picker's setting to Display P3.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394470%2fwhen-exporting-image-from-sketch-why-does-the-color-slightly-changes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
What you are seeing in Xcode is your exported graphic (which appears to have an sRGB ICC profile) rendered in the Display P3 colorspace. The color appears darker in the graphic compared to using the same RGB numeric values because sRGB has a narrower color gamut. In other words, its range of values from 0-255 map to a subset of Display P3's values. Also note that conversions aren't necessarily linear. 0, 0, 0 in sRGB is going to convert to 0, 0, 0 in Display P3 while, obviously, the red and blue values from your color had to map differently to show the same perceptual color.
I don't work in Sketch so I can't say whether it allows you to export a graphic with an ICC profile (sRGB, Display P3). However, in Xcode's custom color picker you can click on the settings icon and choose the color space in which you want to define a color:
This will at least allow you to match colors if your exporting application only supports sRGB. If you can export an asset as a 16-bit, Display P3 PNG or as a vector PDF with an embedded ICC profile, then you can work in Display P3 in both. In that case, you'd change the custom color picker's setting to Display P3.
New contributor
add a comment |
What you are seeing in Xcode is your exported graphic (which appears to have an sRGB ICC profile) rendered in the Display P3 colorspace. The color appears darker in the graphic compared to using the same RGB numeric values because sRGB has a narrower color gamut. In other words, its range of values from 0-255 map to a subset of Display P3's values. Also note that conversions aren't necessarily linear. 0, 0, 0 in sRGB is going to convert to 0, 0, 0 in Display P3 while, obviously, the red and blue values from your color had to map differently to show the same perceptual color.
I don't work in Sketch so I can't say whether it allows you to export a graphic with an ICC profile (sRGB, Display P3). However, in Xcode's custom color picker you can click on the settings icon and choose the color space in which you want to define a color:
This will at least allow you to match colors if your exporting application only supports sRGB. If you can export an asset as a 16-bit, Display P3 PNG or as a vector PDF with an embedded ICC profile, then you can work in Display P3 in both. In that case, you'd change the custom color picker's setting to Display P3.
New contributor
add a comment |
What you are seeing in Xcode is your exported graphic (which appears to have an sRGB ICC profile) rendered in the Display P3 colorspace. The color appears darker in the graphic compared to using the same RGB numeric values because sRGB has a narrower color gamut. In other words, its range of values from 0-255 map to a subset of Display P3's values. Also note that conversions aren't necessarily linear. 0, 0, 0 in sRGB is going to convert to 0, 0, 0 in Display P3 while, obviously, the red and blue values from your color had to map differently to show the same perceptual color.
I don't work in Sketch so I can't say whether it allows you to export a graphic with an ICC profile (sRGB, Display P3). However, in Xcode's custom color picker you can click on the settings icon and choose the color space in which you want to define a color:
This will at least allow you to match colors if your exporting application only supports sRGB. If you can export an asset as a 16-bit, Display P3 PNG or as a vector PDF with an embedded ICC profile, then you can work in Display P3 in both. In that case, you'd change the custom color picker's setting to Display P3.
New contributor
What you are seeing in Xcode is your exported graphic (which appears to have an sRGB ICC profile) rendered in the Display P3 colorspace. The color appears darker in the graphic compared to using the same RGB numeric values because sRGB has a narrower color gamut. In other words, its range of values from 0-255 map to a subset of Display P3's values. Also note that conversions aren't necessarily linear. 0, 0, 0 in sRGB is going to convert to 0, 0, 0 in Display P3 while, obviously, the red and blue values from your color had to map differently to show the same perceptual color.
I don't work in Sketch so I can't say whether it allows you to export a graphic with an ICC profile (sRGB, Display P3). However, in Xcode's custom color picker you can click on the settings icon and choose the color space in which you want to define a color:
This will at least allow you to match colors if your exporting application only supports sRGB. If you can export an asset as a 16-bit, Display P3 PNG or as a vector PDF with an embedded ICC profile, then you can work in Display P3 in both. In that case, you'd change the custom color picker's setting to Display P3.
New contributor
New contributor
answered Feb 24 at 18:48
StonetipStonetip
101
101
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394470%2fwhen-exporting-image-from-sketch-why-does-the-color-slightly-changes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
ICC / colour profiles would be my first guess
– grawity
Jan 15 at 11:27
Interesting. I tried to change Sketch color profiles to
Display P3
, the one Xcode uses, and now i'm having almost the same color. But instead #00EDC7, the generated asset has #6EEDC7! Very strange...– Martin
Jan 16 at 9:12