! See http://factorcode.org/license.txt for BSD license
USING: accessors colors colors.gray colors.hsl combinators
-kernel locals math math.order ;
+kernel math math.order ;
IN: colors.hwb
INSTANCE: hwba color
-<PRIVATE
-
-: value ( p q t -- value )
- dup 0 < [ 1.0 + ] when
- dup 1 > [ 1.0 - ] when
- {
- { [ dup 1/6 < ] [ [ over - ] dip * 6 * + ] }
- { [ dup 1/2 < ] [ drop nip ] }
- { [ dup 2/3 < ] [ [ over - ] dip 2/3 swap - * 6 * + ] }
- [ 2drop ]
- } cond ;
-
-PRIVATE>
-
M: hwba >rgba
[let
{