diff --git a/basis/colors/constants/constants-docs.factor b/basis/colors/constants/constants-docs.factor index 49d6fce3a1..73dd0c0ccc 100644 --- a/basis/colors/constants/constants-docs.factor +++ b/basis/colors/constants/constants-docs.factor @@ -23,7 +23,7 @@ HELP: COLOR: } ; 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: } ; diff --git a/basis/colors/constants/constants.factor b/basis/colors/constants/constants.factor index 98e7d43411..7c9b3ff535 100644 --- a/basis/colors/constants/constants.factor +++ b/basis/colors/constants/constants.factor @@ -19,7 +19,9 @@ IN: colors.constants [ 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> diff --git a/basis/colors/constants/factor-colors.txt b/basis/colors/constants/factor-colors.txt new file mode 100644 index 0000000000..9d7649ab3d --- /dev/null +++ b/basis/colors/constants/factor-colors.txt @@ -0,0 +1,5 @@ +! Factor UI theme colors +227 226 219 FactorLightTan +172 167 147 FactorDarkTan + 81 91 105 FactorLightSlateBlue + 55 62 72 FactorDarkSlateBlue diff --git a/basis/help/stylesheet/stylesheet.factor b/basis/help/stylesheet/stylesheet.factor index 1072e23423..6c0b18e8e9 100644 --- a/basis/help/stylesheet/stylesheet.factor +++ b/basis/help/stylesheet/stylesheet.factor @@ -33,8 +33,8 @@ H{ { 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 @@ -70,7 +70,7 @@ H{ 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 @@ -81,7 +81,7 @@ H{ { font-style bold } } input-style set-global SYMBOL: url-style H{ { font-name "monospace" } - { foreground COLOR: blue } + { foreground COLOR: DodgerBlue4 } } url-style set-global SYMBOL: warning-style @@ -108,7 +108,7 @@ H{ 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 diff --git a/basis/ui/gadgets/buttons/buttons.factor b/basis/ui/gadgets/buttons/buttons.factor index c65309e06d..352190c95f 100644 --- a/basis/ui/gadgets/buttons/buttons.factor +++ b/basis/ui/gadgets/buttons/buttons.factor @@ -119,24 +119,9 @@ PRIVATE> [ append theme-image ] tri-curry@ tri ] 2dip ; -CONSTANT: button-background - T{ rgba - f - 0.8901960784313725 - 0.8862745098039215 - 0.8588235294117647 - 1.0 - } +CONSTANT: button-background COLOR: FactorLightTan +CONSTANT: button-clicked-background COLOR: FactorDarkSlateBlue -CONSTANT: button-clicked-background - T{ rgba - f - 0.2156862745098039 - 0.2431372549019608 - 0.2823529411764706 - 1.0 - } - : ( -- pen ) "button" button-background button-clicked-background dup diff --git a/basis/ui/gadgets/status-bar/status-bar.factor b/basis/ui/gadgets/status-bar/status-bar.factor index e8f0648727..5c4b5d9823 100644 --- a/basis/ui/gadgets/status-bar/status-bar.factor +++ b/basis/ui/gadgets/status-bar/status-bar.factor @@ -8,12 +8,12 @@ IN: ui.gadgets.status-bar : 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 } >>interior ; + COLOR: FactorDarkSlateBlue >>interior ; : ( model -- gadget ) 1/10 seconds [ "" like ] diff --git a/basis/vocabs/prettyprint/prettyprint.factor b/basis/vocabs/prettyprint/prettyprint.factor index 20f7c15293..2813485da3 100644 --- a/basis/vocabs/prettyprint/prettyprint.factor +++ b/basis/vocabs/prettyprint/prettyprint.factor @@ -1,8 +1,9 @@ ! 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 -- ) @@ -85,7 +86,7 @@ PRIVATE> "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