Skip to content

Support for hadamard () for TransparentColors #160

@kimikage

Description

@kimikage

Unlike dot() / tensor(), hadamard() for TransparentColors seems to be clear in its definition. However, currently it is not supported.

julia> argb = ARGB(0.5, 0.25, 0, 1)
ARGB{Float64}(0.5,0.25,0.0,1.0)

julia> argb  argb
ERROR: MethodError: no method matching hadamard(::ARGB{Float64}, ::ARGB{Float64})

julia> mapc(*, argb, argb)
ARGB{Float64}(0.25,0.0625,0.0,1.0)

This is not a critical issue for me (as I have ColorBlendModes 😄), but I thought it would be a pain to explain why it is not supported.

Of course, there is the problem that Gray(0.5) ⊙ ARGB(1.0, 1.0, 1.0, 1.0) does not match 0.5 * ARGB(1.0, 1.0, 1.0, 1.0), though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions