Skip to content

Creating a new Color with explicit type='hex' will cast color twice #1172

Open
@SjonHortensius

Description

@SjonHortensius

This works fine:
new Color('f60'); // Result: [255, 102, 0]

but when you pass the type explicitly, hexToRgb is called twice:
new Color('f60', 'hex'); // Result: [597, 258, 0]

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/359735-creating-a-new-color-with-explicit-type-hex-will-cast-color-twice?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).

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