[Free] Color Extension

Hello everyone!
Today I am thrilled to introduce my very very first extension :smiley:
This extension will help you creating colors.
there are currently 5 methods.
component_method
The above block generates a random color.
How to Use:


component_method (1)
The above block turn An argb block into a Hex color.
How to Use:

component_method (2)
The above block blends two colors into one with with the given ratio.
How to Use:

component_method (3)
The above block parses a Hex color code into argb.
How to Use:

component_method (4)
The above block Creates a color with the given argb color.
Hoe to Use:

Download:com.appybuilder.lukehoogenboom.Colour.aix (7.6 KB)
If there is any Bug or you have an Idea for this extension please let me know.
Cheers :smiley:
Sketch

13 Likes

Thanks for you're contribution, it's a great start :+1:

However, you may need to change the naming conventions of you're blocks. (Example HexColorCode should be hexColorCode) as followed by the lowerCamelCase

2 Likes

Thank you.
I Will change this in the next update.

1 Like

Also spelling:

Exstension >> Extension

1 Like

please update your extension according to the naming conventions now, because everyone who will use it will have to change the updated blocks.... the earlier you change it, the less work others will have to do with the extension...

`Color_Exstension
let me suggest to rename the extension to just Color...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

3 Likes

I've updated IT now

great
however it looks like you are still using the old package name with the underscore and the spelling error?
also please edit your first thread and update the screenshots... thank you...

Taifun

2 Likes

I've updated it.
As for the name it seems that when I change the name the exstension breaks.

See here:

Sorry Anke.
I don't understand it.

you have to change the directory of your extension, the package name and all occurences of Color_Exstension and replace it by Color

Taifun

1 Like

Hello Sketch

Congratulations on making your first App Inventor Extension. Remember that it is your responsibility to maintain it and keep it up-to-date with the changes brought in by new App Inventor versions.... even if that means announcing that it is incompatible.

The situation where that might be required is to carry across a colour specified in the Designer to the Blocks. However, how would this work in practice?

  1. Designer uses 32bit Hex, (RGBA) your example is 24bit Hex (RGB) -if a developer inputs 32bit Hex the result will be wrong. A hex value from the Designer is probably the most common conversion needed.

  2. The icon for your extension is way too large?

Snap1

Snap2

the correct size would be 16px x 16px
Taifun

2 Likes

Thank you :blush:

I didn't know there where more sorts of Hex codes.
I've checked the 32bit Hex code and IT doesn't work.
So I will change that.

Can easily be done with existing blocks:

image

1 Like

component_method (4)

Change this block to take hex values from the text field e.g. # 00FF00FF or # 00FF00 and automatically verify whether the color is 24 bit or 32 bit, then it will make little sense.

I know that.

Can you explains a bit more.
I don't really understand what you are trying to say.

I edited the post. It should be understandable now. Just rewrite this block to recognize hex 24 and 32bit correctly.

I was already Working on that.

we already talked about the naming conventions...
unfortunately you still do not follow them...
the correct name for RGBAColor would be rgbaColor

also you still have that spelling mistake in the extension name... this does not look very professional, does it?

Taifun