How to get the colour of the sky

I was trying to create a little project that could display the weather of any country in Roblox. So, if it was cloudy in a country it would be cloudy in-game.

The problem is if I get the weather of a country where it is nighttime, and there are clouds out, I’ve discovered that
the clouds look very odd at night. This is because the colour of the clouds is white, and does not match with the sky as seen in the image.

So, I was wondering if there was a way to change the colour of the clouds to the colour of the sky? Or even just base this on time without setting the colour of the clouds for every hour.

I was thinking something like a colour picker, but I don’t know if that’s possible or efficient.

So, if anyone knows, I’m listening!

Unfortunately, it is not possible to change the color of sky in roblox studio :frowning:
but you can make a different texture for each sky, for example you can change the color with another program and cast it as sky, so you have many different colors of sky, you can use HTTP Service to get the weather conditions in the countries, you can get information from any site and change the sky texture according to the color you want and for your game you can create a great effect! Your idea is very good and I wish you success in your game.

hope this helped

Well, that’s for the sky, I’m looking to change the colour of the clouds to the colour of the sky.

The sky is fine here, and the only problem is the colouring of the clouds. Because you can see, they are much too bright and looking outside at night, you don’t see clouds that bright.

And I know there is a colour value in the clouds property, I just need to get a colour value from the sky, and I can figure out the rest

are u using plugin for clouds?

There isn’t a way to change the colour of the clouds. You could simulate clouds by using meshes and the changing the colour of the mesh.

No, it’s the default Roblox clouds, a pretty new thing, still being worked on. Just insert a cloud model into Roblox studio and put that instance into the Terrain

image
i can see the cloud,s color property

Yes, that’s what I want to change to the colour of the sky, but how do I get the colour of the sky?

thats impossible to get the colour of sky

What if we based it on the time? Like if it was past 8pm for example, the clouds would darken. I mentioned something like this, but I can’t figure out how to do this without if statements for every single hour

basicaly…

print("Hour : "..os.date("*t",os.time())["hour"])

this prints your Hour in your country
Example :slight_smile:

Hour : 8

Yes, now how can I tell if it is say between 8pm and 4am?

this code does not separate it into pm and am it separates it into 24 hour time zone
like 16:00 and 4:00

Well, okay I’ve got a script that can get the hour by itself. I just need something that can detect if the hour is between 4 and 20. It’s just doing this normally would say that 19 is between 4 and 20, which yes it is but I want this to be so that it detects numbers like 21, 01 and 23 as inbetween these numbers

that would be 4 pm and 4 am
not hard to figure out

Right, gonna ask something new. How can I tell if a number is between 3 and 6?

yeah its not that hard to convert it

you can do it like this

if os.date("*t",os.time())["hour"] <= 6 and os.date("*t",os.time())["hour"] >= 3 then
-- thats between 6 and 3 
end
1 Like