! Copyright (C) 2007 Eduardo Cavazos ! See http://factorcode.org/license.txt for BSD license. USING: kernel combinators arrays sequences math math.functions ; IN: colors.hsv ! h [0,360) ! s [0,1] ! v [0,1] : hsv>rgb ( hsv -- rgb ) dup Hi { { 0 [ [ V ] [ t ] [ p ] tri ] } { 1 [ [ q ] [ V ] [ p ] tri ] } { 2 [ [ p ] [ V ] [ t ] tri ] } { 3 [ [ p ] [ q ] [ V ] tri ] } { 4 [ [ t ] [ p ] [ V ] tri ] } { 5 [ [ V ] [ p ] [ q ] tri ] } } case 3array ;