Last active
December 18, 2019 15:01
-
-
Save nuno/6747921 to your computer and use it in GitHub Desktop.
Transparency in background of views in Appcelerator Titanium
Titanium supports the RGBA color space which means you can use transparent colors! Via: https://coderwall.com/p/pu4isw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var viewWithTransparentBackground = Titanium.UI.createView({ | |
backgroundColor: 'rgba(0,0,0,0.5)' // RGB way: Black background at 0.5 alpha | |
}); | |
//OR | |
var viewWithTransparentBackground = Titanium.UI.createView({ | |
backgroundColor: "#50ff0000" // hex way: red background at 0.5 alpha | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Isn't it
#80ff0000
for 0.5 alpha