ColorPickers interferences #6155

Closed
opened 2023-02-10 20:19:24 +00:00 by fmauclere · 2 comments
fmauclere commented 2023-02-10 20:19:24 +00:00 (Migrated from github.com)

First of all, thank you @ocornut for your fantastic work.

I found a bug on ColorPickers (both RGB and RGBA versions).

With ImGui v1.89.2, when I do this :

static float aaa[4] = { 0, 0, 0, 0 };
static float bbb[4] = { 0, 0, 0, 0 };

if (ImGui::Begin("window aaa"))
  ImGui::ColorPicker4("aaa", aaa);
ImGui::End();

if (ImGui::Begin("window bbb"))
  ImGui::ColorPicker4("bbb", bbb);
ImGui::End();

The ColorPickers seem to interfere with each other when their RGB values are the same full black or full white (all 0 or all 255).
If I use the vertical color bar on the right side of aaa, then the aspect of bbb will also change.

First of all, thank you @ocornut for your fantastic work. I found a bug on ColorPickers (both RGB and RGBA versions). With ImGui v1.89.2, when I do this : ``` static float aaa[4] = { 0, 0, 0, 0 }; static float bbb[4] = { 0, 0, 0, 0 }; if (ImGui::Begin("window aaa")) ImGui::ColorPicker4("aaa", aaa); ImGui::End(); if (ImGui::Begin("window bbb")) ImGui::ColorPicker4("bbb", bbb); ImGui::End(); ``` The ColorPickers seem to interfere with each other when their RGB values are the same full black or full white (all 0 or all 255). If I use the vertical color bar on the right side of aaa, then the aspect of bbb will also change.
ocornut commented 2023-02-11 11:05:14 +00:00 (Migrated from github.com)

Thank you for reporting. We have code trying to preserve HSV properties for lossy round-trips via encoded u32 value and it seems it has a problem here.

Thank you for reporting. We have code trying to preserve HSV properties for lossy round-trips via encoded u32 value and it seems it has a problem here.
ocornut commented 2023-02-14 14:35:16 +00:00 (Migrated from github.com)

Pushed fix fa0852f
Thank you for reporting !

Pushed fix fa0852f Thank you for reporting !
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#6155
No description provided.