Qix-/color

Add an option to allow a RGBA Color object to return a instead of alpha #210

Nukiloco posted onGitHub

I don't think its correct that the alpha property in the RGBA object return is {r: 255, g: 255, b: 255, alpha: 1} instead of {r: 255, g: 255, b: 255, a: 1} though this is just a personal preference. In many libraries that I have seen that deals with colors, they use a instead of alpha to return an alpha variable in their RGBA color returns. If its possible, can there be an option where we can set the library to return the RGBA object alpha as a instead of alpha? Thanks!


If its possible, can there be an option where we can set the library to return the RGBA object alpha as a instead of alpha?

No, sorry. You can always do this:

const {r, g, b, alpha: a} = color.object();

The reason it's alpha instead of a is because the lab model exists.

posted by Qix- over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests