Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Right RGB Colors for day&night cycle?  (Read 2457 times)
0 Members and 1 Guest are viewing this topic.
Offline Hades85

Senior Newbie

« Posted 2017-04-07 11:39:59 »


even its a stupid question, there is no perfect color for my request because every people here has a different taste.
But i need to ask what RGB floats do you would use for example a game with 4 states of a day?


At the moment i just "trial and error" and it is very annoying.

Is there any Website to figure out or can you give some advice?
Offline theagentd
« Reply #1 - Posted 2017-04-07 12:09:25 »

The most common values are dark bluish for night, orange for morning/dawn and white for day, possibly with a small tint of orange there too.

Something like
 morning: (0.6, 0.4, 0.3)
 day: (1.0, 0.9, 0.8 )
 dawn: (0.6, 0.4, 0.3)
 night (0.1, 0.1, 0.2), could be darker.

You can tweak these values as you want, but approximately these ratios between colors usually work well.

Offline Hades85

Senior Newbie

« Reply #2 - Posted 2017-04-07 12:33:47 »

Thank you very much. Saves hours of testing  Grin
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline theagentd
« Reply #3 - Posted 2017-04-07 15:01:41 »

These ratios work decently well for HDR effects too, but they depend a bit on your tone mapping functions as well, so may require additional tweaking.

Offline KaiHH

JGO Kernel

Medals: 786

« Reply #4 - Posted 2017-04-07 17:06:29 »

day: (1.0, 0.9, 0.8 )
Hmm.. idk. When I look outside at day it's usually more blueish and not red at all. More like:
(0.7, 0.9, 1.0)
I guess it depends on where on earth you live (i.e. how near the sun gets to the zenith).
Offline LiquidNitrogen
« Reply #5 - Posted 2017-04-08 02:28:22 »

Here are some values I've used. I wanted everything to still be quite easily visible at night so that you can see what you're doing, so it doesn't get overly dark. I also used values for each hour, rather than only each time period because dawn and dusk have a more rapid light level transition compared to the gradual transitions going into and after mid day and mid night, so this gives better control over that transition rate.

      {{0.4f, 0.4f, 0.7f},// 12am
      {0.4f, 0.4f, 0.7f},// 1am
      {0.4f, 0.4f, 0.7f},// 2am
      {0.4f, 0.4f, 0.7f},// 3am
      {0.4f, 0.4f, 0.7f},// 4am
      {0.7f, 0.4f, 0.7f},// 5am //before sunrise
      {1.0f, 0.6f, 0.7f},// 6am //sunrise
      {1.0f, 0.8f, 0.8f},// 7am //after sunrise
      {1.0f, 1.0f, 0.9f},// 8am
      {1.0f, 1.0f, 1.0f},// 9am
      {1.0f, 1.0f, 1.0f},// 10am
      {1.0f, 1.0f, 1.0f},// 11am
      {1.0f, 1.0f, 1.0f},// 12pm
      {1.0f, 1.0f, 1.0f},// 1pm
      {1.0f, 1.0f, 1.0f},// 2pm
      {1.0f, 1.0f, 1.0f},// 3pm
      {1.0f, 1.0f, 1.0f},// 4pm
      {1.0f, 1.0f, 1.0f},// 5pm
      {1.0f, 1.0f, 1.0f},// 6pm
      {1.0f, 1.0f, 0.9f},// 7pm
      {1.0f, 0.8f, 0.8f},// 8pm //before sunset
      {1.0f, 0.6f, 0.7f},// 9pm //sunset
      {0.7f, 0.4f, 0.7f},// 10pm //after sunset
      {0.4f, 0.4f, 0.7f}}// 11pm
Offline theagentd
« Reply #6 - Posted 2017-04-08 19:55:10 »

Hmm.. idk. When I look outside at day it's usually more blueish and not red at all. More like:
(0.7, 0.9, 1.0)
I guess it depends on where on earth you live (i.e. how near the sun gets to the zenith).
The sun is always a little bit red/orange due to the blue light being scattered more heavily. Due to this, the direct light from the sun is orange, but the light from the sky is blue. In direct illumination from the sun, these two should roughly cancel out resulting in white. In addition, nights aren't actually blue; this is just a stylization thing that is very common in games and movies to visualize nighttime, and people are quite used to it, so they interpret it as nighttime. Basically, I answered with values that I believe "look good". They aren't based on IRL colors.

Pages: [1]
  ignore  |  Print  

Riven (397 views)
2019-09-04 15:33:17

hadezbladez (5280 views)
2018-11-16 13:46:03

hadezbladez (2204 views)
2018-11-16 13:41:33

hadezbladez (5544 views)
2018-11-16 13:35:35

hadezbladez (1150 views)
2018-11-16 13:32:03

EgonOlsen (4585 views)
2018-06-10 19:43:48

EgonOlsen (5462 views)
2018-06-10 19:43:44

EgonOlsen (3119 views)
2018-06-10 19:43:20

DesertCoockie (4016 views)
2018-05-13 18:23:11

nelsongames (4708 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!