Code colors in App inventor. RGB-opacity. Get color. Pick color.

471 views
Skip to first unread message

Juan Antonio

unread,
Nov 8, 2016, 2:06:59 PM11/8/16
to MIT App Inventor Forum
Hi,
These days I'm studying the colors in App Inventor.

I have posted tutorials about colors, but...  ummm are in Spanish, but maybe can help someone.

In Spanish RGB is (Rojo, Verde, Azul) RVA.

1.- -------------------------------------------------------- ------

This about subtraction color (CMYK):


2.- ----------------------------------------------------------------

In this app you pick color over image Canva and get RVA

If color is R= 240, V = 130, A = 80 then get Color = -1015216

Sub ConvertLongToRGB(ByVal Value As Long, R As Byte, G As Byte, B As Byte) 
R = Value Mod 256 
G = Int(Value / 256) Mod 256 
B = Int(Value / 256 / 256) Mod 256 
End Sub

Color = RVA - 16777216


3.- ------------------------------------------------------------------

In this tutorial you set R = 240, V = 130,  A = 80,  opacity = 255 and get Color =  4293952080

 N = A + (V + (R + (256 x opacidad)) x 256 ) x 256


4.- ----------------------------------------------------------------

This about opacity:


5.- ------------------------------------------------------------------

This is an app by Italo about RGBtoCMYK


-----------------------------------------------------------------

Italo

unread,
Nov 8, 2016, 2:26:38 PM11/8/16
to MIT App Inventor Forum
Very complete study. And thanks for the mention!
Reply all
Reply to author
Forward
0 new messages