Added a text file, "factor-colors.txt", which is like "rgb.txt" except it lists the theme colors used in the Factor UI.
Changed url-style color to DodgerBlue4 to match link-style.
} ;
ARTICLE: "colors.constants" "Standard color database"
-"The " { $vocab-link "colors.constants" } " vocabulary bundles the X11 " { $snippet "rgb.txt" } " database and provides words for looking up color values."
+"The " { $vocab-link "colors.constants" } " vocabulary bundles the X11 " { $snippet "rgb.txt" } " database and Factor's " { $snippet "factor-colors.txt" } " theme database to provide words for looking up color values by name."
{ $subsection named-color }
{ $subsection named-colors }
{ $subsection POSTPONE: COLOR: } ;
[ parse-color ] H{ } map>assoc ;
MEMO: rgb.txt ( -- assoc )
- "resource:basis/colors/constants/rgb.txt" utf8 file-lines parse-rgb.txt ;
+ "resource:basis/colors/constants/rgb.txt"
+ "resource:basis/colors/constants/factor-colors.txt"
+ [ utf8 file-lines parse-rgb.txt ] bi@ assoc-union ;
PRIVATE>
--- /dev/null
+! Factor UI theme colors
+227 226 219 FactorLightTan
+172 167 147 FactorDarkTan
+ 81 91 105 FactorLightSlateBlue
+ 55 62 72 FactorDarkSlateBlue
{ font-size 18 }
{ font-style bold }
{ wrap-margin 500 }
- { foreground T{ rgba f 0.216 0.243 0.282 1.0 } }
- { page-color T{ rgba f 0.94 0.94 0.91 1.0 } }
+ { foreground COLOR: FactorDarkSlateBlue }
+ { page-color COLOR: FactorLightTan }
{ border-width 5 }
} title-style set-global
SYMBOL: code-style
H{
- { page-color T{ rgba f 0.94 0.94 0.91 1.0 } }
+ { page-color COLOR: FactorLightTan }
{ border-width 5 }
{ wrap-margin f }
} code-style set-global
SYMBOL: url-style
H{
{ font-name "monospace" }
- { foreground COLOR: blue }
+ { foreground COLOR: DodgerBlue4 }
} url-style set-global
SYMBOL: warning-style
SYMBOL: table-style
H{
{ table-gap { 5 5 } }
- { table-border T{ rgba f 0.94 0.94 0.91 1.0 } }
+ { table-border COLOR: FactorLightTan }
} table-style set-global
SYMBOL: list-style
[ append theme-image ] tri-curry@ tri
] 2dip <tile-pen> ;
-CONSTANT: button-background
- T{ rgba
- f
- 0.8901960784313725
- 0.8862745098039215
- 0.8588235294117647
- 1.0
- }
-
-CONSTANT: button-clicked-background
- T{ rgba
- f
- 0.2156862745098039
- 0.2431372549019608
- 0.2823529411764706
- 1.0
- }
-
+CONSTANT: button-background COLOR: FactorLightTan
+CONSTANT: button-clicked-background COLOR: FactorDarkSlateBlue
+
: <border-button-pen> ( -- pen )
"button" button-background button-clicked-background
<border-button-state-pen> dup
: status-bar-font ( -- font )
sans-serif-font clone
- T{ rgba f 0.216 0.243 0.282 1.0 } >>background
+ COLOR: FactorDarkSlateBlue >>background
COLOR: white >>foreground ;
: status-bar-theme ( label -- label )
status-bar-font >>font
- T{ rgba f 0.216 0.243 0.282 1.0 } <solid> >>interior ;
+ COLOR: FactorDarkSlateBlue <solid> >>interior ;
: <status-bar> ( model -- gadget )
1/10 seconds <delay> [ "" like ] <arrow> <label-control>
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel sorting sequences vocabs io io.styles arrays assocs
-namespaces sets parser colors prettyprint.backend prettyprint.sections
-prettyprint.stylesheet vocabs.parser make fry math.order ;
+USING: accessors arrays assocs colors colors.constants fry io
+io.styles kernel make math.order namespaces parser
+prettyprint.backend prettyprint.sections prettyprint.stylesheet
+sequences sets sorting vocabs vocabs.parser ;
IN: vocabs.prettyprint
: pprint-vocab ( vocab -- )
"To avoid doing this in the future, add the following forms" print
"at the top of the source file:" print nl
] with-style
- { { page-color T{ rgba f 0.94 0.94 0.91 1.0 } } }
+ { { page-color COLOR: FactorLightTan } }
[ manifest get pprint-manifest ] with-nesting
nl nl
] print-use-hook set-global
\ No newline at end of file