This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

ColorSpace Library
#1
Working with IoT and other gateways I use to handle different color schemas

RGB the most used, but Homekit uses HSV and WLED use HEX

so I wrote a library to convert:
RGB to XYZ (D65/2°) and viceversa
RGB to CMY and viceversa
RGB to HSV and vivecersa

.gz   colorSpace_v1_0.tar.gz (Size: 2.63 KB / Downloads: 12)

you can upload it and use the functions:

RGB2XYZ(R,G,B) : provide R, G and B (0~255) return 3 variables: X, Y and Z (0~100)
XYZ2RGB(X,Y,Z): provice X, Y and Z (0~100) and return  R, G and B (0~255)

other funtions are:
RGB2HSV(R, G, B)
HSV2RGB(H,S,V)
RGB2CMY(R,G,B)
CMY2RGB(C,M,Y)

there is function  help('{funcname}') also, unfortunately only in italian Tongue Tongue 
hope this could help!!

ciao
M
Reply


Messages In This Thread
ColorSpace Library - by emme - 02.12.2023, 18:39

Forum Jump: