Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (colors)
Viewing all articles
Browse latest Browse all 8

rgba( r, g, b, a ) not working with warning in radial gradient colorStop.

$
0
0

I am trying to use a color in rgba format in a colorStop of a radial gradient. Unfortunately this give me a warning in the log and does not seem to work. The strange thing is that I could swear it was working an hour ago. Here is my code:

if ( Ti.Platform.osname !== 'android' ) {
    // ios supports radial gradient backgrounds
    var gradient = {
        type: 'radial',
        startRadius: 0,
        endRadius: '50%',
        colors: [
            {
                color: 'rgba( 255, 255, 255, 1 )',
                    offset: 0
                },
                {
                    color: colors[ color ],
                    offset: 1
                }
        ]
    }
 
    var self = Ti.UI.createView( {
        width: size,
        height: size,
        backgroundColor: 'transparent',
        backgroundGradient: gradient
    } );
} else {
Which is giving me the following warning:

[WARN] Hex color passed looks invalid: rgba( 0, 0, 255, 0 )

Why is it doing this? The documentation says that this is a valid color format...


Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>