Skip to content

Support for Hex shorthand colors #6

@jigarius

Description

@jigarius

Currently, Hsluv.hex_to_hsluv works with #ffffff, however, it doesn't work with #fff. I was wondering if there's a possibility to support the shorthand. If you think it's a good thing to have, I can try creating a PR.

> Hsluv.hex_to_hsluv('#fff')

ArgumentError: wrong number of arguments (given 2, expected 3)
from /nix/store/kn5y2xfa9gps4qdwklavf6hhrfml7dr3-ruby2.7.1-hsluv-1.0.1/lib/ruby/gems/2.7.0/gems/hsluv-1.0.1/lib/hsluv.rb:46:in `rgb_to_hsluv'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions