- Home /
Can't create orange label
Hey guys, so i want to create an orange text color label, but it turns yellow.
I have this: Color newColor = new Color(255, 127, 0, 255); (i think this is the code for orange)
but it shows yellow for some reason. I used this color to:
public GUIStyle Style; Style.normal.textcolor = newColor;
It worked for other custom colors but not for orange, what to do?
Answer by Azaroth · Apr 28, 2013 at 07:27 AM
Ok, so how can i create orange?
this is not an answer. please read the FAQ and view the video tutorial on the right-hand side of the page.
Answer by Grundadrakk · Jul 10, 2018 at 07:17 AM
you have to create rgb colors from 0 to 1.
orange color has the rgb color 255, 165, 0
to get 165 in relation, use the formula (165 * 100 / 255) / 100
Color _orange = new Color(1.0f, 0.64f, 0.0f);
Your answer
Follow this Question
Related Questions
How can I use a GUIStyle in a Custom Editor which is set within that Custom Editor? 1 Answer
GUIStyle in an inspector array 0 Answers
GUIStyle.CalcSize appears to break when your style specifies padding 1 Answer
GUILayout.SelectionGrid with GUIStyle ignores textColor 2 Answers
Change Color For One Line? 1 Answer