From their website: "f.lux is patent pending". So when they get their patent, they can sell licenses.
Considering they’ve both implemented it, I’d guess Apple & Google have either already licensed the tech or decided the patent application has no merit.