Skip to content

Color handling error in Python mode. #68

@tildebyte

Description

@tildebyte

Mr. Feinberg was nice enough to allow designating hex colors like so when using the Processing Python mode[1]:

c1 = color(255, 0, 0, 100)
c2 = '#0000FF'
fill(lerpColor(c1, c2, .5))

Unfortunately, HYPE methods don't seem to like this:

rect1 = HRect(100)
rect1.fill('#FF6600')  # set fill color

yields

TypeError: fill(): 1st arg can't be coerced to int

I recognize that this might actually be uncovering a subtle bug or missing function in the Python mode, but I figured I'd try here first, as the error only occurs when using HYPE.

[1] '#' is the Python comment designator.

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