diff --git a/basis/colors/colors.factor b/basis/colors/colors.factor index cdcd0ec93e..4e178c56a7 100644 --- a/basis/colors/colors.factor +++ b/basis/colors/colors.factor @@ -33,3 +33,6 @@ CONSTANT: transparent T{ rgba f 0.0 0.0 0.0 0.0 } color1 >rgba-components drop [ 1.0 percent - * ] tri@ color2 >rgba-components drop [ percent * ] tri@ [ + ] tri-curry@ tri* 1.0 ; + +: inverse-color ( color -- color' ) + >rgba-components [ [ 1.0 swap - ] tri@ ] dip ;