HSL 到 RGB 颜色转换 [英] HSL to RGB color conversion
本文介绍了HSL 到 RGB 颜色转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一种将 HSL 颜色转换为 RGB 的算法.
I am looking for an algorithm to convert between HSL color to RGB.
在我看来,HSL 的使用不是很广泛,所以我在寻找转换器时运气不佳.
It seems to me that HSL is not very widely used so I am not having much luck searching for a converter.
推荐答案
找到最简单的方法,python 到 救援 :D
Found the easiest way, python to the rescue :D
colorsys.hls_to_rgb(h, l, s)
将颜色从 HLS 坐标转换为 RGB 坐标.
Convert the color from HLS coordinates to RGB coordinates.
这篇关于HSL 到 RGB 颜色转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文