! Copyright (C) 2014 John Benediktsson ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.lch kernel math.functions ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | 0.0 1.0 0.1 [| g | 0.0 1.0 0.1 [| b | r g b 1.0 dup >LCHuv >rgba [ >rgba-components 4array ] bi@ [ 0.00001 ~ ] 2all? ] all? ] all? ] all? ] unit-test { t } [ 0.0 1.0 0.1 [| r | 0.0 1.0 0.1 [| g | 0.0 1.0 0.1 [| b | r g b 1.0 dup >LCHab >rgba [ >rgba-components 4array ] bi@ [ 0.00001 ~ ] 2all? ] all? ] all? ] all? ] unit-test