Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

new Color from hex in unity

Color greenColor;
ColorUtility.TryParseHtmlString("#0AC742", out greenColor);
Comment

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) ;
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# base64 decode 
Csharp :: c# remove all null from list 
Csharp :: c# summary link 
Csharp :: easily start admin process from service c# 
Csharp :: c# remove last value from list 
Csharp :: button color uwp c# 
Csharp :: unity look at 2d 
Csharp :: c# log to console 
Csharp :: c# change label value into int 
Csharp :: unity print 
Csharp :: loop through multidimensional array c# 
Csharp :: wpf choose file dialog 
Csharp :: how to change the extension of a file C# 
Csharp :: how to instantiate as child unity 
Csharp :: get filename from path c# 
Csharp :: delay in unity 
Csharp :: how to get executable path in wpf 
Csharp :: unity move character 
Csharp :: xml node update attribute value c# 
Csharp :: windows forms iterate through all controls 
Csharp :: c# write text before user input 
Csharp :: Use tuple to swap values c# 
Csharp :: how to be like bill gates 
Csharp :: unity input.getkeyup not working 
Csharp :: remove first object from list c# 
Csharp :: get the current directory in unity 
Csharp :: c# get path without filename 
Csharp :: unity get selected gameobject 
Csharp :: unity knowing when 0 input is pressed 
Csharp :: unity lock cursor to center 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =