Int to RGB Neko [SOLVED]

I’m using toRGB function from this link http://old.haxe.org/doc/snip/colorconverter however it throws error on neko (Invalid operation (>>)). I was having similar problem here Actuate.transform color doesn’t work on neko however now I’m not sure how to fix it. I’m passing values such as 0xFAAD39. I though that I might have to use int = Std.int(int) but this throws other error ([email protected]_floor Called from Std::int line 39). Everything works fine on other targets.

Edit: It seems that it was problem in other part of my code :slight_smile: Sometimes I was passing null instead of int, android accepted this and didn’t throw any errors so I though it has something to do with neko.

maybe it is too much, but if you need to do more stuff on colors I would suggest to use hxColorToolkit.
It is a very good lib and, in a similar fashion to Stringtools, expand Int to give you also

var myColorR = 0xFAAD39.toHex().red;

check it out

1 Like

This is great :slight_smile: Thank you.