Skip to content
New issue

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

rgba / alpha support? #12

Closed
sheymann opened this issue Aug 7, 2013 · 2 comments
Closed

rgba / alpha support? #12

sheymann opened this issue Aug 7, 2013 · 2 comments

Comments

@sheymann
Copy link

sheymann commented Aug 7, 2013

Hi,

Do you plan to support the alpha channel? I must use https://github.com/harthur/color for alpha work.

@gka
Copy link
Owner

gka commented Aug 8, 2013

Yes, that was actually planned. I just started a new feature branch for this.

Here's the new API:

var col;

col = chroma.color('red').alpha(0.25);
col = chroma.rgb(255,0,0,0.25);
col = chroma.css("rgba(255,0,0,0.25)");
col = chroma.css("hsla(0,100%,50%,0.25)");

col.alpha() // returns 0.25
col.alpha(0.6)  // returns col

Feel free to try to the experimental version until I find more time to finish and test this release properly. If you find bugs, you can help me by adding comments to this ticket and adding more test cases.

@gka
Copy link
Owner

gka commented Nov 18, 2013

this is supported as of version 0.5.1

@gka gka closed this as completed Nov 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants