]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/colors/ryb/ryb.factor
factor: trim using lists
[factor.git] / basis / colors / ryb / ryb.factor
index d96cc15f6a11b20fa92736a2a07f84481adf5dcd..d6622677202b11f321a43195f542087c6a60d8b5 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2013 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
 
-USING: accessors colors kernel locals math math.order ;
+USING: accessors colors kernel math math.order ;
 
 IN: colors.ryb
 
-TUPLE: ryba < color
+TUPLE: ryba
     { red read-only }
     { yellow read-only }
     { blue read-only }
@@ -13,6 +13,8 @@ TUPLE: ryba < color
 
 C: <ryba> ryba
 
+INSTANCE: ryba color
+
 <PRIVATE
 
 : normalized ( a b c quot: ( a b c -- a' b' c' ) -- a' b' c' )
@@ -61,7 +63,7 @@ C: <ryba> ryba
 
 PRIVATE>
 
-M: ryba >rgba ( ryba -- rgba )
+M: ryba >rgba
     [
         [ red>> ] [ yellow>> ] [ blue>> ] tri
         [ ryb>rgb ] normalized