Post

Replies

Boosts

Views

Activity

Color not working properly
Hi, I am participating in the swift student challenge, and I need some help. When I make a color by Color(red: , green: , blue: ), I calculate it by getting the rgb of the color that I want and dividing each of the colors by 255. For example, if red was 5, I would divide it by 255 to get 0.01960784313, which I put in the code for the red parameter. However, when I run the code, the color that appears is a bit different than the one I was expecting to see. Can someone please explain this?
5
0
1.4k
Jan ’24