GDevelopApp / GDevelop-extensions

Repository of behaviors, actions, conditions and expressions to be used in GDevelop for creating games
https://gdevelop.io
MIT License
131 stars 52 forks source link

Colour Conversions Extension #88

Closed Add00 closed 3 years ago

Add00 commented 3 years ago

Describe the extension

A simple extension that converts rgb values into other colour formats.

Checklist

Extension file

colourConversions.zip

4ian commented 3 years ago

Great idea :) This is overall looking good, I have multiple nitpickings so that the extension reach an almost perfect state:

A few feedbacks:

Finally, for all functions can you verify what is going on if you enter an invalid value as a parameter? Thanks! :)

Add00 commented 3 years ago

Thanks for taking the time to review my extension. I think I've added all your feedback so let me know what you think.

colorConversion.zip

4ian commented 3 years ago

Thanks! Looks great :) I've fixed a few grammar mistakes ("an" => "a"), added periods, and changed the error handling so that all errors are logged in the console, and a default value is returned (black in all cases, i.e: "0;0;0").

Right now I have place holder text there since I'm not sure what the message content should be.

Usually, I choose something like console.error("Unable to do blabla:", error) with error being the exception or the message describing what went wrong.

Thanks for working on this! :)