3 ms·
Here's XSLT code that transforms RGB colour space into LCH (and vice versa), which is then used to colourise an arbitrary number of visually distinct and harmon
by thangalin 10y ago
Here's XSLT code that transforms RGB colour space into LCH (and vice versa), which is then used to colourise an arbitrary number of visually distinct and harmonious pie chart wedges:
http://stackoverflow.com/a/25481023/59087 http://stackoverflow.com/a/25481023/59087
The algorithm is straightforward, albeit verbose.
- TeMPOraL 10y agoI'll add my shot at converting RGB to CIE (XY + brightness) I wrote for my command line controller for Hue lights: https://github.com/TeMPOraL/hju/blob/39b0c2c27f5f076a93b360d6fac65967c9879c2e/hju.ros#L296 https://github.com/TeMPOraL/hju/blob/39b0c2c27f5f076a93b360d... (code in Common Lisp) Hue documentation (available after registering with them) also has example algorithm in (AFAIR) Objective-C. EDIT: replaced Github link with commit permalink, in case I change the file in the future.