Skip to content

Equality testing and hashing #18

@connorferster

Description

@connorferster

Hi there! I am interested in using spectra as a colour library and was hoping that it could perform equality testing and hashing. Currently, this is the state of equality testing:

spectra.html('black') == spectra.html('black') # False
spectra.rgb(1, 0, 0) == spectra.rgb(1, 0, 0) # False
hash(spectra.rgb(1, 0, 0)) == hash(spectra.rgb(1, 0, 0)) # False

Would you be open to a PR that implemented equality testing through the __eq__ and __hash__ methods?

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