Page MenuHome

hex color entry wants to fight the user
Closed, ResolvedPublic


System Information
Operating system and graphics card
Fedora Linux 29

Blender Version
Broken: 2.80alpha 2 2018-11-22

Short description of error

When entering color as a hex entry, Blender reinterprets it and shows a different value, because the computer knows color management way better than the banana loving ape in front of the screen.

Exact steps for others to reproduce the error
Go into, say, world color, switch to hex color view, enter ffffff, but blender insists on showing ddcfd8 (with a note that it's gamma corrected). I would expect all the color management to happen on top of the input value rather than adjusting the input value.

Here's a show screencast of the situation:

Event Timeline

Do note this was an old .blend and the display device was mysteriously set to DCI-P3 rather than sRGB, which does not seem to suffer from this.

Brecht Van Lommel (brecht) triaged this task as Confirmed, Medium priority.

Probably hex should always convert to/from sRGB color space without a view transform and regardless of the display space.

@Brecht Van Lommel (brecht) something else seems to be wrong with the color transform too. Blender crashes for me if I switch to DCI-P3 and try to change the world color wheel, hsv, or hex values.
This is the error it prints:

OpenColorIO Error: 3D Luts can only be applied in the forward direction. (inverse) specified.

This seems to get triggered by the ui_block_cm_to_scene_linear_v3 calls in source/blender/editors/interface/interface_region_color_picker.c

Yes, the problem is that it goes through a view transform which is not invertible in general, and just not appropriate for this case.

Anyway, fixing this requires some familiarity with the color management system, so assigning to self.