Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3786928
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:45:35+00:00 2026-05-19T11:45:35+00:00

We are having an application ported from Windows to Mac OS, and colors are

  • 0

We are having an application ported from Windows to Mac OS, and colors are being displayed differently on both platforms. Here’s an example:

Mysterious color difference

In this case, we’re telling the application to use green 0,140,0 and blue 25,0,75. On windows, this works great (top image). On the Mac, apparently OS X decides to “reinterpret” the colors and displays them differently (bottom image).

Is there something we can do to tell the operating system to stop being creative with our color definitions? It’s going to be hard to make things look good on both platforms if the mac arbitrarily changes our color definitions by ~10%.

Edit: Here’s an example of the code we’re using to set the color for the blue used above:

    m_colour = CGColorCreateGenericRGB(25 / 255.0, //r
                                       0 / 255.0,  //g
                                       75 / 255.0, //b
                                       1.0);       //a

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:45:36+00:00Added an answer on May 19, 2026 at 11:45 am

    The Mac uses a complex colourspace system called ColorSync to ensure colours appear identical on different devices. As a result, colours may sometimes be shifted slightly in the RGB space so that they appear to the eye identical on properly calibrated displays, printers, etc.

    If you show us the code you use to generate that shade of green, we can show you how to modify it to avoid this colour correction. However, unless there’s a pressing reason why you want to avoid it, it’s usually better to let it happen, as you do not have a wide range of display models to test against.

    Edit: CGColorCreateGenericRGB() creates a colour in the generic RGB colour space, so it’s going to end up shifting slightly depending on your display calibration. Unfortunately for you, it is no longer possible (as of Mac OS X 10.4) to create an instance of CGColor that is device-dependent (and therefore not subject to calibration.) You can, however, create a CGColor in the colour space of the target drawing context–that will tell Quartz that no conversion is necessary.

    If you’ve created the context yourself, you should keep a reference to the colour space you used (of the type CGColorSpaceRef.) If it’s at the Cocoa level (such as the context created by -[NSImage lockFocus] or by -[NSView drawRect:] then you should use the relevant NSColor APIs instead of the CGColor APIs (i.e. +[NSColor colorWithDeviceRed:green:blue:alpha:].)

    If you must use Quartz drawing, you can call CGContextSetRenderingIntent() to tell the context how you want to have colours converted, but there is no guarantee that a conversion will not take place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently having issues with my Facebook appliation being ported to CodeIgniter from raw
I am working an application having I18N support. In this application, based on user's
I'm having a big problem when calling a web service from my WPF application.
I'm porting my application searches over to Sphinx from MySQL and am having a
Not having much luck getting help from any of you Spring gurus on here.
I need to port a .Net application from Windows to OS X and I
I'm having troubles getting data from the system clipboard on Mac OS X. What
In an application having UITabBarController , I want to implement following scenario: When user
We are having an application developed for BlackBerry - a pretty big one only.
I am having an application that will be installed on various machines. Now if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.