colors - Change a ParticleEffect colour in a LibGDX game to a certain RGB value -


i created 2d particle effect particle editor tool comes libgdx. then, needed change particle effect colour rgb colour programatically. purpose, found method:

myeffect.getemitters().get(0).gettint().setcolors(float [] colours);

my problem don't know how convert rgb colour proper array values required method since don't know colour format used.

in particleeditor, colour selection format looks hsv. however, colour values stored in resulting *.p file don't seem match format.

i wish tell me how conversion.

thanks

from javadocs

public void setcolors(float[] colors) 

parameters colors - r, g , b values every timeline position

it takes rgb values in float, there online convertor takes html color (hex) , convert them rgb decimal values , can pass them inside setcolors() method.

here link.

convertor


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -