Converting an RGBW color to a standard RGB/HSB representation

前端 未结 3 1118
不知归路
不知归路 2021-01-03 02:14

I am building an interface for light management in a home automation system. I managed to control standard on/off and dimmable light for various providers with little proble

3条回答
  •  [愿得一人]
    2021-01-03 03:09

    I know this is a fairly old question, but I'm looking at the RGB->RGBW algorithm and found this article which - whilst not the answer - may help?

    http://web.archive.org/web/20101008153429/http://www.nouvoyance.com:80/files/pdf/Adding-a-White.pdf

    In this, they suggest one conversion for RGB->RGBW is simply to create the W from min(R, G, B).

    • R -> R
    • G -> G
    • B -> B
    • W -> min(R, G, B)

    The reverse of this (for your scenario) would simply be to throw away the W.

    • R -> R
    • G -> G
    • B -> B
    • W -> null

提交回复
热议问题