Skip to content

color_picker3, color_edit3 now require an explicit ImVec4 object in v1.92.6 #444

@kushalkolar

Description

@kushalkolar

Hi! I develop/maintain fastplotlib which uses wgpu-py for imgui support.

Before v1.92.6, imgui.color_picker3 and imgui.color_edit3 would accept a tuple[float, float, float], and it now explicitly requires an ImVec4 type. I'm wondering if this was intentional since the signature for color_picker3 and color_edit3 are:

def color_edit3(label: str, col: ImVec4Like, flags: ColorEditFlags = 0) -> Tuple[bool, ImVec4]:
    pass

And ImVec4Like defined as:

ImVec4Like = Union[ImVec4, Tuple[int | float, int | float, int | float, int | float], List[int | float]]

So from the type definition it should accept a tuple or list as well. Does the type definition have to be changed, or was the change non-intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions