Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何以 HSL 格式获取小部件背景颜色(纯 gwt)?例如,我尝试使用,label.getElement().getStyle().getBackgroundColor();但它总是以 RGB 格式返回颜色,尽管原始格式是#FFFFFF:S
label.getElement().getStyle().getBackgroundColor();
#FFFFFF
请分享一些有用的技巧
谢谢
您可以将 RBG 值转换为 HSL:
http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript