! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs combinators destructors fry html io
io.backend io.pathnames io.styles kernel macros make math
-math.order math.parser namespaces sequences strings words
-splitting xml xml.syntax ;
+math.functions math.order math.parser namespaces sequences
+strings words splitting xml xml.syntax ;
IN: html.streams
GENERIC: url-of ( object -- url )
: hex-color, ( color -- )
[ red>> ] [ green>> ] [ blue>> ] tri
- [ 255 * >integer >hex 2 CHAR: 0 pad-head % ] tri@ ;
+ [ 255 * round >integer >hex 2 CHAR: 0 pad-head % ] tri@ ;
: fg-css, ( color -- )
"color: #" % hex-color, "; " % ;