]> gitweb.factorcode.org Git - factor.git/blob - basis/colors/hex/hex-docs.factor
9f67875da2984132607c4b0ca411fd2b63a273ba
[factor.git] / basis / colors / hex / hex-docs.factor
1 ! Copyright (C) 2010 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
3
4 USING: colors help.markup help.syntax strings ;
5
6 IN: colors.hex
7
8 HELP: hex>rgba
9 { $values { "hex" string } { "rgba" color } }
10 { $description "Converts a hexadecimal string value into a " { $link color } "." }
11 ;
12
13 HELP: rgba>hex
14 { $values { "rgba" color } { "hex" string } }
15 { $description "Converts a " { $link color } " into a hexadecimal string value." }
16 ;
17
18 HELP: HEXCOLOR:
19 { $syntax "HEXCOLOR: value" }
20 { $description "Parses as a " { $link color } " object with the given hexadecimal value." }
21 { $examples
22   { $code
23     "USING: colors.hex io.styles ;"
24     "\"Hello!\" { { foreground HEXCOLOR: 336699 } } format nl"
25   }
26 } ;
27
28 ARTICLE: "colors.hex" "HEX colors"
29 "The " { $vocab-link "colors.hex" } " vocabulary implements colors specified "
30 "by their hexadecimal value."
31 { $subsections
32     hex>rgba
33     rgba>hex
34     POSTPONE: HEXCOLOR:
35 }
36 { $see-also "colors" } ;
37
38 ABOUT: "colors.hex"