some basic stuffs.

This commit is contained in:
2022-12-21 18:17:40 +01:00
parent e00fe2a4d2
commit 6f8def066f
9 changed files with 181 additions and 21 deletions
+4
View File
@@ -180,6 +180,10 @@ func (col *Color) ToXY() (col2 Color, ok bool) {
}
func (col *Color) Interpolate(other Color, fac float64) Color {
if col.AlmostEquals(other) {
return *col
}
// Special case for kelvin values.
if col.IsKelvin() && other.IsKelvin() {
k1 := *col.K