SelectColor returns incorrect color

I tried to meticulously follow your steps multiple times on each OS
I was unable to get the results you describe

Yet, I did not invent the screen recording.

[quote=307433:@Norman Palardy]I tried to meticulously follow your steps multiple times on each OS
I was unable to get the results you describe[/quote]
Try setting different colour profiles for your monitor via the Displays system preference before opening the colour picker as that could impact the result if ICC colour management is the cause.

Hello, Michel.
I tested here and got the same error as you reported, I’m on Mac OS 10.12.2 and Xojo 2016 r4.1!

Thank you Paulo. Now I know I am not crazy, no more than the guy who created this thread.

I just wish Joe and Norman were able to reproduce the issue.

BTW the color profile does play a role in the issue. With the same value in the picker, the result varies with color profile.

I thought this was about the SelectColor function where sometimes I get an off-by-1 value.

Using the Insert Color menu I can reproduce getting far-off values only with the spectrum. Wheel and Crayola are only sometimes off-by-1.

[quote=307498:@Will Shank]I thought this was about the SelectColor function where sometimes I get an off-by-1 value.

Using the Insert Color menu I can reproduce getting far-off values only with the spectrum. Wheel and Crayola are only sometimes off-by-1.[/quote]

That is what I describe very clearly. Here Wheel and Spectrum create the same issue.

I have this ‘off-by-1’ also sometimes in Linux.

If I click in one of the selectable text fields (in Color Selector) and it gets the focus, the result is correct.

[quote=303216:@Michel Bujardet]I could not reproduce the issue you describe in 2016R4.1.

I used the very basic example from the LR http://documentation.xojo.com/index.php/SelectColor

Dim c as Color Dim b as Boolean c=CMY(.35,.9,.6) //choose the default color shown in color picker b=SelectColor(c,"Select a Color") system.debuglog str(c)

You should try downloading 2016R4.1 and see if the problem persists.[/quote]

let say i got the value and convert to string to update to a table.
How do i set the selectcolor to the color read in from the table??
and how do i convert string back to color so i can assign to a control?

c=CMY(.35,.9,.6) //choose the default color shown in color picker

i used and and it is working now

Function ToColor(extends ColorString As String) As Color
  Dim v As Variant = ColorString
  Dim c As Color = v.ColorValue
  Return c
End Function

http://developer.xojo.com/color
You should get the RGB values for storage, then restore the values to a color with the RGB function.
When you use variant you’re asking for trouble.

[quote=308885:@Tim Parnell]http://developer.xojo.com/color
You should get the RGB values for storage, then restore the values to a color with the RGB function.
When you use variant you’re asking for trouble.[/quote]

do u mean i need 3 fields for each set of RGB?
what might be the problem with variant???