SelectColor and the passed default color

I read Feedback 50021 (Colour picker presets & Hex fields are not working on IDE) but I am unsure this is what I get.

The code below does not display the c default colors in the code below.

Dim c As Color c = RGB(20,80,140) c = SelectColor(c, "Select a Color")

I need it for a current project (and probably every SelectColor user) that may fall in the water if The way things are going (or I will trash the project if no contract).

I get that in Xojo 2015r1, verified on Xojo 2018r1.1 (on El Capitan).

Can you confirm that ? IS it a Xojo Bug or a macOS bug ?

Tried it in 2018r1.1 on macOS 10.13.5 and it works perfectly when I change the last line to

Dim result as Boolean = SelectColor(c, "Select a Color")

The numbers won’t match; but the colours should. Welcome to the exciting world of color profiles (and they suck).

Xojo has standardised on a Generic Color Space; where as the macOS allows for multiple profiles to be stored everywhere. Most of the time they don’t get in your way; but that time that they do is incredibly frustrating to track down.

As someone who does a lot of image manipulation; I certainly appreciate Xojo’s choice to use only one color profile through their framework. I recently had a hard time with a custom Core Image filter because of how Core Image handles color profiles.

I can make your numbers match for you; but then the colors won’t :slight_smile:

Thanks.

The default color (meant to be the contents of c) is black instead of c.

This is just the feedback color in c that is wrong at Color window open, but the selected color (once I set my RGB values is correct.

This was working sometimes ago (maybe many times ago).

Ulrich: I will check about the Boolean error above (this was not my actual code, so I may have done an error), but I do not think this interfere with the default Color in the window (since this is the returned value (Yes|No).

Yes, my code was correct:

Color_Bool = SelectColor(Custom_Color, "Select a Color") 

In another window, I have the KeyDown event that is ignored, MouseDown who do not set the focus (draw the focus ring around the Canvas), but Paste works fine !

So, I was capable to wongly use an example in a simplecopy/paste :wink:

I go back to the project.