You can make any color that your phone can display in App Inventor.
This Site has Moved to http://www.Blocks123.net and will no longer be updated here.
Here we have a little program that lets you create a color, name it and then save it to a database so you can recall it later.
(for background I assume you've read http://appinventor.googlelabs.com/learn/reference/blocks/colors.html)
Things Used in this program
Screen1.Initialize: see if we already have a database and if not then set up a basic one.
List: We use two lists, One is the primary, lColorNames which is the list of the Names we give to each color. This is also the Index for our database, you could think of it as Column 1 in a table. The other list is lColorNumbers which contents the Numbers that AI uses to make colors and it is indexed to lColorNames
ListPicker: We use two ListPickers, one to choose a color for the background and the other to delete a color from the database.
Screen Layout: We use a home made spin box to enter the ORGB (Opacity & RGB) numbers Screen . and use Labels to center them.
Clock: We use the clock to keep our ORGB Screen Centered and to Rotate through the background colors.
Notifier: To enter the color name
TinyDB: to store the values between use.
The Source Code:https://sites.google.com/site/blocks123/playing-with-colors/PlayingwithColors.zip
Starting the program:
iScreenWidth= The width that we need to make each of our spacer labels to center our ORGB screen.
dbTagColorNames & dbTagColorNumbers are DataBaseTags so that we don't mistype and call the wrong thing.
Change the Back Ground Color
Save a Color, Notifier action (I try to keep things short here, in a final program please check the response before doing anything with it)
Controls for the ORGB Screen
Convert an ORGB numbers into a App Inventor Number
ListPicker's for changing the Background and Deleting a record.
*GOOGLE and Google App Inventor is a trademark of Google Inc. All screenshots of 'Google App Inventor' are used in accordance with Google Inc Permission guidelines.
Blocks123.net and other content of this site is Copyright 2010 Edward Filkins. All Rights Reserved