spatie / color

A little library to deal with color conversions
https://spatie.be/opensource/php
MIT License
350 stars 36 forks source link

RGB and RGBA should accept % values #71

Closed jcogs-design closed 2 years ago

jcogs-design commented 2 years ago

Currently neither the RGB nor RGBA classes accept values defined as percentages. As noted here, both should accept either integer values in range 0-255, or a % in range 0-100, where 100% is then converted to 255.

freekmurze commented 2 years ago

We'll take this further in your PR.