         { font-size 20 }
         { font-style bold }
         { background HEXCOLOR: ff6600 }
+        { foreground COLOR: black }
     } assoc-union format nl ;
 
 : hacker-news. ( -- )

! Copyright (C) 2012 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs classes.tuple colors.constants
colors.hex combinators formatting fry http.client io io.styles
json.reader kernel make math sequences splitting urls json
math.parser hashtables ;
IN: hacker-news

TUPLE: post title postedBy points id url commentCount postedAgo ;

: write-title ( title url -- )
    '[
        _ presented ,,
        output-stream get 256color? [
            COLOR: white foreground ,,
        ] [
            COLOR: black foreground ,,
        ] if
    ] H{ } make format ;

: write-link ( title url -- )
