Skip to content

Decimals are rounded (rgb(...) -> toRgb) #278

Open
@matthias-ccri

Description

@matthias-ccri

This code produces rounded output:

tinycolor('rgb(255, 25.5, 0)').toRgb();
// {r: 255, g: 26, b: 0, a: 1}

25.5 was rounded to 26.

Is the rounding intentional?

See this PR which adds a failing unit test: #277

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