Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Color difference between old and new application

Color difference between old and new application

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiotutorialquestion
14 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gopi_cpp
    wrote on last edited by
    #1

    Hello Everybody, We have an application which is created in VC++ 6.0 version, in that we are displaying some colors (Pantone color) reading the colors from text file and displaying. When I use the same text file (with same color details), in Visual Studio 2008 or higher, the application is displaying different color (actual color is this) For example, Original RGB is 198, 93, 82 Using color picker, for old application, its giving RGB as 120, 27, 20 and in the new application it shows 198, 93 and 82. Will there be any color variation between old and new applications (visual studios)? Thanks in advance, A. Gopinath.

    E L B 3 Replies Last reply
    0
    • G gopi_cpp

      Hello Everybody, We have an application which is created in VC++ 6.0 version, in that we are displaying some colors (Pantone color) reading the colors from text file and displaying. When I use the same text file (with same color details), in Visual Studio 2008 or higher, the application is displaying different color (actual color is this) For example, Original RGB is 198, 93, 82 Using color picker, for old application, its giving RGB as 120, 27, 20 and in the new application it shows 198, 93 and 82. Will there be any color variation between old and new applications (visual studios)? Thanks in advance, A. Gopinath.

      E Offline
      E Offline
      enhzflep
      wrote on last edited by
      #2

      Howdy, I'm not so sure I understand your question. rgb(198,93,82) looks like This , while rgb(120,27,20) looks like This Obviously, these 2 colours are not only very different in terms of their RGB values and their HSL values for that matter, but they also appear very different to anyone not unfortunate enough to be hit with R-G colour blindness. Aren't you actually telling us yourself that the colours appear differently? Their pantone numbers are also very different, 180 U vs 1815 C I can't help but wondering 3 things: 1) What is the format of the input in the text-file and the exact input that produces these colours? 2) How is this being transformed into a colour by your application? 3) What difference did you find when you stepped through the conversion process in your debugger in each of the versions of the application? I'm not familiar with the conversion process between rgb <--> pantone to know if a small difference in precision could produce such a wildly different result, or if it's an integer-only process that could suffer from a signed/unsigned error. Showing the input and the way it results in a final colour could well help, though it may not.

      "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon

      G 1 Reply Last reply
      0
      • G gopi_cpp

        Hello Everybody, We have an application which is created in VC++ 6.0 version, in that we are displaying some colors (Pantone color) reading the colors from text file and displaying. When I use the same text file (with same color details), in Visual Studio 2008 or higher, the application is displaying different color (actual color is this) For example, Original RGB is 198, 93, 82 Using color picker, for old application, its giving RGB as 120, 27, 20 and in the new application it shows 198, 93 and 82. Will there be any color variation between old and new applications (visual studios)? Thanks in advance, A. Gopinath.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        gopi_cpp wrote:

        Using color picker, for old application

        What colour picker are you referring to, and how do you select the values?

        G 1 Reply Last reply
        0
        • E enhzflep

          Howdy, I'm not so sure I understand your question. rgb(198,93,82) looks like This , while rgb(120,27,20) looks like This Obviously, these 2 colours are not only very different in terms of their RGB values and their HSL values for that matter, but they also appear very different to anyone not unfortunate enough to be hit with R-G colour blindness. Aren't you actually telling us yourself that the colours appear differently? Their pantone numbers are also very different, 180 U vs 1815 C I can't help but wondering 3 things: 1) What is the format of the input in the text-file and the exact input that produces these colours? 2) How is this being transformed into a colour by your application? 3) What difference did you find when you stepped through the conversion process in your debugger in each of the versions of the application? I'm not familiar with the conversion process between rgb <--> pantone to know if a small difference in precision could produce such a wildly different result, or if it's an integer-only process that could suffer from a signed/unsigned error. Showing the input and the way it results in a final colour could well help, though it may not.

          "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon

          G Offline
          G Offline
          gopi_cpp
          wrote on last edited by
          #4

          Hello, Thanks for your reply. This is the format in text file in which pantone color details are written. PANTONE Number Name L* a* b* sR sG sB PANTONE 11-0103 TCX Egret 93.74 1.19 6.78 243 236 224 PANTONE 11-0602 TCX Snow White 94.93 0.1 2.67 242 240 235 PANTONE 11-0601 TCX Bright White 96.21 -0.44 1.61 244 245 240 The value which I gave previously is PANTONE 17-1544 TCX Burnt Sienna 53.75 43.63 28.62 198 93 82 In the new application, on a color button (CColorBtn), i am displaying the colors. In the old application, they are loading this L, a and b values, converting into color values. for this, they are using some third party, i am not able to go depth in that. color is displayed on some other control, not on button in old application. Regards, A. Gopinath.

          E 1 Reply Last reply
          0
          • L Lost User

            gopi_cpp wrote:

            Using color picker, for old application

            What colour picker are you referring to, and how do you select the values?

            G Offline
            G Offline
            gopi_cpp
            wrote on last edited by
            #5

            Hello Richard, I am using the colorpic which is downloaded from the link below. http://www.iconico.com/colorpic/[^] if you move the mouse over any place, the application will display the color values. Regards, A. Gopinath.

            L 1 Reply Last reply
            0
            • G gopi_cpp

              Hello Richard, I am using the colorpic which is downloaded from the link below. http://www.iconico.com/colorpic/[^] if you move the mouse over any place, the application will display the color values. Regards, A. Gopinath.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              I do not understand. You already have the required values in a text file so why do you need a colour picker.

              G 1 Reply Last reply
              0
              • L Lost User

                I do not understand. You already have the required values in a text file so why do you need a colour picker.

                G Offline
                G Offline
                gopi_cpp
                wrote on last edited by
                #7

                This color picker is only for checking the color values. this is nowhere related with the application.

                L 1 Reply Last reply
                0
                • G gopi_cpp

                  This color picker is only for checking the color values. this is nowhere related with the application.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  So what does any of this have to do with your problem?

                  G 1 Reply Last reply
                  0
                  • L Lost User

                    So what does any of this have to do with your problem?

                    G Offline
                    G Offline
                    gopi_cpp
                    wrote on last edited by
                    #9

                    Just need to know that will there be a color difference in visibility with application created in VC++ 6.0 and VC++ 2010.

                    L 1 Reply Last reply
                    0
                    • G gopi_cpp

                      Just need to know that will there be a color difference in visibility with application created in VC++ 6.0 and VC++ 2010.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      No difference, assuming your code is correct: RGB values are constants.

                      1 Reply Last reply
                      0
                      • G gopi_cpp

                        Hello, Thanks for your reply. This is the format in text file in which pantone color details are written. PANTONE Number Name L* a* b* sR sG sB PANTONE 11-0103 TCX Egret 93.74 1.19 6.78 243 236 224 PANTONE 11-0602 TCX Snow White 94.93 0.1 2.67 242 240 235 PANTONE 11-0601 TCX Bright White 96.21 -0.44 1.61 244 245 240 The value which I gave previously is PANTONE 17-1544 TCX Burnt Sienna 53.75 43.63 28.62 198 93 82 In the new application, on a color button (CColorBtn), i am displaying the colors. In the old application, they are loading this L, a and b values, converting into color values. for this, they are using some third party, i am not able to go depth in that. color is displayed on some other control, not on button in old application. Regards, A. Gopinath.

                        E Offline
                        E Offline
                        enhzflep
                        wrote on last edited by
                        #11

                        Ahhhhh! What you say about them reading in the L-a-b values may very well be the key here - unless of course, it is the exact same library performing the colour-space transformation each time. I mean, the RGB values are also available in each line and as far as a colour-picker is concerned, are entirely unambiguous. While different monitors/printers may display the same RGB value in a way that appears differently to our eyes and would produce different RGB values if a photograph of the results are compared. However, the first paragraph from the wikipedia page on Lab color space[^] may possibly hold the key to the different results. It says: > A Lab color space is a color-opponent space with dimension L for lightness and a and b for the > color-opponent dimensions, based on nonlinearly compressed (e.g. CIE XYZ color space) coordinates. > The terminology originates from the three dimensions of the Hunter 1948 color space, which are L, > a, and b.[1][2] However, Lab is now more often used as an informal abbreviation for the L-a-b > representation of the CIE 1976 color space (or CIELAB, described below). The difference between > the original Hunter and CIE color coordinates is that the CIE coordinates are based on a cube root > transformation of the color data, while the Hunter coordinates are based on a square root > transformation. Other examples of color spaces with Lab representations include the CIE 1994 > color space and the CIE 2000 color space. (emphasis mine) Reading on further, I was reminded that there are a number of systems based on Lab and importantly, _they do not all employ the same conversion formula to rgb_ I'll bet that if you plug the Lab values (53.75, 43.63, 28.62) given for the colour you mentioned into the different formulas one of them will give you 198,93,82 and another of them will give you 120,27,20 Naturally, the contents of my comment are entirely moot if the exact same code is used to convert from Lab -> RGB and also if the tests are performed on different machines, since RGB values are device-dependant, while Lab values are not. What a curly problem you have! :doh:

                        "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't u

                        G 1 Reply Last reply
                        0
                        • E enhzflep

                          Ahhhhh! What you say about them reading in the L-a-b values may very well be the key here - unless of course, it is the exact same library performing the colour-space transformation each time. I mean, the RGB values are also available in each line and as far as a colour-picker is concerned, are entirely unambiguous. While different monitors/printers may display the same RGB value in a way that appears differently to our eyes and would produce different RGB values if a photograph of the results are compared. However, the first paragraph from the wikipedia page on Lab color space[^] may possibly hold the key to the different results. It says: > A Lab color space is a color-opponent space with dimension L for lightness and a and b for the > color-opponent dimensions, based on nonlinearly compressed (e.g. CIE XYZ color space) coordinates. > The terminology originates from the three dimensions of the Hunter 1948 color space, which are L, > a, and b.[1][2] However, Lab is now more often used as an informal abbreviation for the L-a-b > representation of the CIE 1976 color space (or CIELAB, described below). The difference between > the original Hunter and CIE color coordinates is that the CIE coordinates are based on a cube root > transformation of the color data, while the Hunter coordinates are based on a square root > transformation. Other examples of color spaces with Lab representations include the CIE 1994 > color space and the CIE 2000 color space. (emphasis mine) Reading on further, I was reminded that there are a number of systems based on Lab and importantly, _they do not all employ the same conversion formula to rgb_ I'll bet that if you plug the Lab values (53.75, 43.63, 28.62) given for the colour you mentioned into the different formulas one of them will give you 198,93,82 and another of them will give you 120,27,20 Naturally, the contents of my comment are entirely moot if the exact same code is used to convert from Lab -> RGB and also if the tests are performed on different machines, since RGB values are device-dependant, while Lab values are not. What a curly problem you have! :doh:

                          "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't u

                          G Offline
                          G Offline
                          gopi_cpp
                          wrote on last edited by
                          #12

                          ah, thanks for your reply. different point of view. will try to by-pass Lab values with RGB instead of conversion. thanks again.

                          E 1 Reply Last reply
                          0
                          • G gopi_cpp

                            ah, thanks for your reply. different point of view. will try to by-pass Lab values with RGB instead of conversion. thanks again.

                            E Offline
                            E Offline
                            enhzflep
                            wrote on last edited by
                            #13

                            You're welcome. :) It certainly seems like an avenue of investigation worthy of consideration - one less thing to introduce unnecessary(?) complexity.

                            "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon

                            1 Reply Last reply
                            0
                            • G gopi_cpp

                              Hello Everybody, We have an application which is created in VC++ 6.0 version, in that we are displaying some colors (Pantone color) reading the colors from text file and displaying. When I use the same text file (with same color details), in Visual Studio 2008 or higher, the application is displaying different color (actual color is this) For example, Original RGB is 198, 93, 82 Using color picker, for old application, its giving RGB as 120, 27, 20 and in the new application it shows 198, 93 and 82. Will there be any color variation between old and new applications (visual studios)? Thanks in advance, A. Gopinath.

                              B Offline
                              B Offline
                              basementman
                              wrote on last edited by
                              #14

                              Could it be different default palettes?

                              onwards and upwards...

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups