Calculates the color between a given start and end color using a delta value between 0 and 1
(s_color, e_color, delta)
| 58 | |
| 59 | |
| 60 | def CalculateTransition(s_color, e_color, delta): |
| 61 | """ |
| 62 | Calculates the color between a given start and end color using a delta |
| 63 | value between 0 and 1 |
| 64 | """ |
| 65 | |
| 66 | sR, sG, sB, sA = s_color |
| 67 | eR, eG, eB, eA = e_color |
| 68 | |
| 69 | tR = sR + (eR - sR) * delta |
| 70 | tG = sG + (eG - sG) * delta |
| 71 | tB = sB + (eB - sB) * delta |
| 72 | |
| 73 | return wx.Colour(round(tR), round(tG), round(tB), round((sA + eA) / 2)) |
nothing calls this directly
no outgoing calls
no test coverage detected