Qix-/color

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Invalid value input is not handled properly #239

n0ruSh posted onGitHub

How to reproduce:

  1. Open Sandbox
  2. Check the console output

Current behavior

  • For invalid rgb input (E.g. "rgb(277,0,0)"), r is rounded to the nearest valid value 255 and a value is returned.
  • For invalid hex input (E.g. "#p10000"), an exception is thrown.

Expected behavior

Exceptions are expected to be thrown for all invalid inputs (i.e. for input that can't be turned into an equivalent color).

Extra info

Probablly related to this code: https://github.com/Qix-/color-string/blob/4daceef89391f28eba415d043bbd1163c8f19a8c/index.js#L128


I agree though this is a breaking change. It'd have to wait for v5 unfortunately.

posted by Qix- about 3 years ago

Any plan for v5 😃

posted by n0ruSh almost 3 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests