コード例 #1
0
        public void GetDataShouldReturnValidHueData()
        {
            const int hueOffset = 1;

            var color = Color.Cyan;
            var data  = CreatePayloadData(color, Percentage.MaxValue, Temperature.None, 0);

            HueConverter.ConvertUInt16ToHue(data.ToUInt16(hueOffset)).Should().Be(color.Hue);
        }
コード例 #2
0
        private static Hue ParseHue(byte[] data)
        {
            var value = data.ToUInt16(startIndex: 0);

            return(HueConverter.ConvertUInt16ToHue(value));
        }