scttcper/tinycolor

getAlpha() class method is missing

c0bra opened this issue ยท 2 comments

c0bra commented

^ 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 ๐Ÿ“ฆ๐Ÿš€