Changes

Jump to navigation Jump to search
no edit summary
Line 20: Line 20:  
</pre>
 
</pre>
   −
=== For example, how would I change the background color of my activity? ===
+
 
 +
=== Is there a transparent color? ===
 +
Yes there is.  You want to use sugar.graphics.style.COLOR_TRANSPARENT
 +
 
 +
=== Can I use the sugar color object for my own colors since it offers so many useful conversion functions?  ===
 +
Indeed, you can construct your own color objects with all of the same conversion utilities.  Pass into the constructor a hexadecimal string.  An optional second parameter lets you specify an alpha value.
 +
 
 +
<pre>
 +
red = sugar.graphics.style.Color('#FF0000')
 +
</pre>
 +
 
 +
 
 +
=== How do I change the background color of my activity? ===
 
Here is how you would change the color of your activity's background using the sugar system colors:
 
Here is how you would change the color of your activity's background using the sugar system colors:
 
<pre>
 
<pre>
Anonymous user

Navigation menu