Color Extension

This is an App Inventor Extension to convert color models.It has 3 method,more details below.

• The number "2" means the word "to" in the extension.

AI2HEX

Input an App Inventor color block(either default color block or makecolorblock),and it will return a Hex value.

Example:Input a red block,then it will return feffff.

It is a six-digits hex string,without 0x00 or # in the front,all letters are lower case letters,pay attention to the digit,it has only 6 digits,not 8 or 3.

Usually when you use a hex color value(usually by the web client),you may need to add an # in the front.

HEX2AI

Input a Hex color value.It must be a six-digits hex string,without 0x00 or # in the front,all letters must be lower case letters,pay attention to the digit,it has only 6 digits,not 8 or 3.

Then it will return a negative integer,you can just place it after some blocks like set Button1.BackgroundColor to .Actually,App Inventor color value is just a negative number,more details here"App Inventor Color Chart".

RGB2HEX

Input r(red),g(green),b(blue) value(integers between 0 and 255),it will return an six-digits hex string,without # in the front.All letters are capital letter.See the example below:

Example:Input rgb value(255,246,123),return FFF67B.

Its result is different from the hex value of the first method or the second one.So pay attention to this point.Remember the capital letter.