Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

How can I use Hex color Unity? , give hex color in unity

I'm pretty new to Unity but I know that the Color constructor takes 3 parameters for r(red), g(green) and b(blue). If you understand better HEX colors than rgb ones, you should use an online converter to convert a HEX color you want to a rgb color. Then you can use :

 float r ;  // red component
 float g ;  // green component
 float b ;  // blue component
 image.color = new Color(r,g,b) ;
 
PREVIOUS NEXT
Tagged: #How #I #Hex #color #give #hex #color #unity
ADD COMMENT
Topic
Name
9+2 =