Change canvas color with listpicker

105 views
Skip to first unread message

dora paz

unread,
Sep 6, 2018, 6:14:01 AM9/6/18
to MIT App Inventor Forum
Hello,
I followed the paintpot tutorial part 1 and part 2 and i tried to change the size of the line and change canvas color with listpicker. I managed to change the size of the line and to change the canvas color using listpicker but in my list doesn't show the color name but the number of the color.

Any help appreciated , Thank you in advance

Dora





Screenshot_20180906-125116.jpg blocks.png


Screenshot_20180906-125119.jpg

SteveJG

unread,
Sep 6, 2018, 9:51:51 AM9/6/18
to MIT App Inventor Forum
This list of colors to numbers might help you do what you want to do  http://appinventor.mit.edu/explore/app-inventor-color-chart.html Dora. You can use the information to construct your own color number to color name listofpairs and display the color name in the ListPicker instead of the number.

Regards,
Steve

Abraham Getzler

unread,
Sep 6, 2018, 11:57:45 AM9/6/18
to MIT App Inventor Forum
Be sure to check out the lookup-in-pairs block from the Lists section of the
Blocks Editor to transform the English color names into their 
color values after Selection.

ABG

Abraham Getzler

unread,
Sep 6, 2018, 12:24:14 PM9/6/18
to MIT App Inventor Forum
The color table SteveJG mentioned looked so handy, I thought I would
post the skeleton code to bring it in as a table for lookup.

See attached.

ABG
color_codes.txt
Colors.aia
LemonChiffon.PNG
Azure.PNG
blocks.png

dora paz

unread,
Sep 7, 2018, 2:58:41 PM9/7/18
to MIT App Inventor Forum
Thank you so much for your help!! I just made my first app !

blocks (4).png



DrawFreeVersion1 (1).aia

Abraham Getzler

unread,
Sep 7, 2018, 4:15:52 PM9/7/18
to MIT App Inventor Forum
Congratulations!
ABG
Reply all
Reply to author
Forward
0 new messages