Skip to content

Convert color32 to color

Ask for help here ;)

Convert color32 to color

Postby bigSky » 09 Jul 2012, 05:09

Hi There,

Is there any way that I can convert color32 to color, as in this example from the docs?
http://docs.unity3d.com/Documentation/S ... Color.html

I see "byte is not implemented yet", but no operators.
bigSky
 
Posts: 126
Joined: 05 May 2011, 22:57

Re: Convert color32 to color

Postby Neodrop » 12 Jul 2012, 09:13

Try to use "Typeof Of or Cast" node if it's can't be converted automaticaly
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Convert color32 to color

Postby bigSky » 12 Jul 2012, 10:16

Not sure if this works. Cast fails when implemented, unless I'm failing at implementing cast. Any graph? Or, any chance of it getting converted automatically in another version of Vizio?
bigSky
 
Posts: 126
Joined: 05 May 2011, 22:57

Re: Convert color32 to color

Postby Neodrop » 16 Jul 2012, 09:56

Yes, I will add it (autoconverting) to my list. Now, you can write SmartBlock to implement this converting, or use Wizard>>Create Instance to create a new Color and assign it's value by R.G.B.A separately.
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Convert color32 to color

Postby bigSky » 25 Aug 2012, 23:55

How's this going? Can we get at bytes at all?
It seems that when I try to get any result (colour32 get r, g,b,a) - I get "bytes are not implemented yet."

But the conversion must be happening somewhere, because in the editor, if I read an image, I get nicely formatted colors.

Get Pixels 32 does not work with any cast. I'm trying to read a image sequence (or webcam) , and so would love to get be able to not bother with making color structs, and to be able to deal with bytes.
bigSky
 
Posts: 126
Joined: 05 May 2011, 22:57

Re: Convert color32 to color

Postby RydnevJe » 23 Aug 2015, 22:35

Awesome guide! Thanks for sharing with us!
RydnevJe
 
Posts: 15
Joined: 23 Aug 2015, 22:23


Return to HELP!!!

Who is online

Registered users: No registered users