fix opacity function
Merge pull request #2 from pustovalov/patch-2

Fix opacity function.