Hey! I’m relatively new to Unity and I’m having some trouble with changing colours of game objects that I can’t find explanations for online.
The first one is pretty simple: when i try to assign a color to an object via script:
GetComponent<Renderer>().material.color = new Color32(...);
I always get a darker color than the rbg code I chose from the inspector.
So if I chose new Color32(0,255,227,255); , i would still get blue but a much darker one.
Same thing happens if I try to get random colours, they all seem to be the same each time, and very dark.
I already tried creating a public Color in the script and selecting the one i wanted via inspector to no luck. Using HSV and just Color() also hasn’t worked.
The second one is a bit more tricky, i’m running this:
Hello @TheKidsDontStandAChance ,
What kind of material/shader are you using on the object you are trying change color on?
Also, what color space is your project in? (Edit > Project Settings > Player > Color Space)
As to why your code is creating a darker result, I can’t reproduce this when using your code. You could share some screenshots to show what you are seeing as well, that might give me some more insight.