scttcper / tinycolor

🎨 Color manipulation and conversion

Home Page:https://tinycolor.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getAlpha() class method is missing

c0bra opened this issue Β· comments

^ title says it all

It seems as you can just refer to alpha as a directly from the TinyColor-object, from the tests:

const hexSetter = new TinyColor('rgba(255, 0, 0, 1)');

// Alpha should start as 1
expect(hexSetter.a).toBe(1);

hexSetter.setAlpha(0.5);
// setAlpha should change alpha value
expect(hexSetter.a).toBe(0.5);

Anyways, for backwards compatibility I guess it would be nice to have getAlpha(), so either it should be added, or getAlpha() should be removed from the documentation.

πŸŽ‰ This issue has been resolved in version 2.3.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€