When exporting image from Sketch, why does the color slightly changes?












0















If I configure an asset in Sketch with color #00EDC7 (for example), export it in PDF (or PNG):



enter image description here



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.



enter image description here



Then if I use the Xcode color picker and I pick the exported asset color, the color found will be #6CE8C8



enter image description here



Why? Color configuration? How to configure Sketch to avoid this?










share|improve this question


















  • 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


















0















If I configure an asset in Sketch with color #00EDC7 (for example), export it in PDF (or PNG):



enter image description here



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.



enter image description here



Then if I use the Xcode color picker and I pick the exported asset color, the color found will be #6CE8C8



enter image description here



Why? Color configuration? How to configure Sketch to avoid this?










share|improve this question


















  • 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
















0












0








0








If I configure an asset in Sketch with color #00EDC7 (for example), export it in PDF (or PNG):



enter image description here



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.



enter image description here



Then if I use the Xcode color picker and I pick the exported asset color, the color found will be #6CE8C8



enter image description here



Why? Color configuration? How to configure Sketch to avoid this?










share|improve this question














If I configure an asset in Sketch with color #00EDC7 (for example), export it in PDF (or PNG):



enter image description here



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.



enter image description here



Then if I use the Xcode color picker and I pick the exported asset color, the color found will be #6CE8C8



enter image description here



Why? Color configuration? How to configure Sketch to avoid this?







colors xcode






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 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
















  • 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










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












1 Answer
1






active

oldest

votes


















0














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.



colorsync utility screenshot



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:



Xcode color picker color space



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.






share|improve this answer








New contributor




Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    0














    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.



    colorsync utility screenshot



    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:



    Xcode color picker color space



    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.






    share|improve this answer








    New contributor




    Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      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.



      colorsync utility screenshot



      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:



      Xcode color picker color space



      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.






      share|improve this answer








      New contributor




      Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        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.



        colorsync utility screenshot



        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:



        Xcode color picker color space



        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.






        share|improve this answer








        New contributor




        Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        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.



        colorsync utility screenshot



        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:



        Xcode color picker color space



        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.







        share|improve this answer








        New contributor




        Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Feb 24 at 18:48









        StonetipStonetip

        101




        101




        New contributor




        Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Stonetip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            RAC Tourist Trophy