Skip to content

Converting to web_color gives invalid color like #ffff #63

@DenVdmj

Description

@DenVdmj

When I convert to web_color from root menu (info.html) I get invalid color like „#ffff“:

f1

Next, I choose „white“:

f2

I guess that this code („color_helper_insert.py“, line 42):

    if convert == "name":
        try:
            if len(target_color) > 7:
                target_color = target_color[:-2]
            self.web_color = csscolors.hex2name(target_color)
        except:
            pass
        self.force_alpha = True

can be replaced by the following code:

    if convert == "name":
            self.web_color = csscolors.hex2name(target_color)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions