We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line 34: return new Rgb((int) ($this->gray * 2.55), (int) ($this->gray * 2.55), (int) ($this->gray * 2.55));
return new Rgb((int) ($this->gray * 2.55), (int) ($this->gray * 2.55), (int) ($this->gray * 2.55));
If $this->gray is 100, it will return Rgb(254,254,254)
because PHP being weird and: (int) (100 * 2.55) = 254
Can be fixed by changing it to: return new Rgb((int) ($this->gray * 255 / 100), (int) ($this->gray * 255 / 100), (int) ($this->gray * 255 / 100));
return new Rgb((int) ($this->gray * 255 / 100), (int) ($this->gray * 255 / 100), (int) ($this->gray * 255 / 100));
The text was updated successfully, but these errors were encountered:
Feel free to supply a PR with a matching test :)
Sorry, something went wrong.
No branches or pull requests
line 34:
return new Rgb((int) ($this->gray * 2.55), (int) ($this->gray * 2.55), (int) ($this->gray * 2.55));
If $this->gray is 100, it will return Rgb(254,254,254)
because PHP being weird and: (int) (100 * 2.55) = 254
Can be fixed by changing it to:
return new Rgb((int) ($this->gray * 255 / 100), (int) ($this->gray * 255 / 100), (int) ($this->gray * 255 / 100));
The text was updated successfully, but these errors were encountered: