Set background color based on outdoor temperature

前端 未结 4 460
-上瘾入骨i
-上瘾入骨i 2021-01-31 20:04

Heyoh SO,

I have a temperature widget to implement on a project I am working on. Nothing is specially difficult, I\'ve got a free API to retrieve the datas that I need e

4条回答
  •  有刺的猬
    2021-01-31 20:52

    The wikipedia article on color temperature is not connected to your problem. The wikipedia article is only relevant for digital imaging experts. Color temperature in this context means something different ...

    Your problem is about how to visualize a certain temperature in degrees celsius. There is no standard algorithm to do this. It's up to the designer how to solve this task.

    I would probably build an array of rgb-values for every 2.5°C or 5°C and then blend by rgb for the temperature values in between.

提交回复
热议问题