Index: fmtext.c
===================================================================
--- fmtext.c	(revision 7b4f3bea704ed82f2c36ba19fcf354d7442a5bb7)
+++ fmtext.c	(revision 4479497945518a0fe5ddc9e5cf08f98bc7990cd9)
@@ -184,7 +184,14 @@
 }
 
+static void _owl_fmtext_update_colorpair(short fg, short bg, short *pair)
+{
+  if (owl_global_get_hascolors(&g)) {
+    *pair = owl_fmtext_get_colorpair(fg, bg);
+  }
+}
+
 static void _owl_fmtext_wcolor_set(WINDOW *w, short pair)
 {
-  if (has_colors()) {
+  if (owl_global_get_hascolors(&g)) {
       wcolor_set(w,pair,NULL);
       wbkgdset(w, COLOR_PAIR(pair));
@@ -214,5 +221,5 @@
   bg = default_bgcolor;
   _owl_fmtext_wattrset(w, attr);
-  pair = owl_fmtext_get_colorpair(fg, bg);
+  _owl_fmtext_update_colorpair(fg, bg, &pair);
   _owl_fmtext_wcolor_set(w, pair);
 
@@ -263,5 +270,5 @@
       if (bg == OWL_COLOR_DEFAULT) bg = default_bgcolor;
       _owl_fmtext_wattrset(w, attr);
-      pair = owl_fmtext_get_colorpair(fg, bg);
+      _owl_fmtext_update_colorpair(fg, bg, &pair);
       _owl_fmtext_wcolor_set(w, pair);
 
@@ -655,4 +662,5 @@
            continue */
       } else if (!strcasecmp(buff, "@color") 
+                 && owl_global_get_hascolors(&g)
                  && owl_global_is_colorztext(&g)) {
         g_free(buff);
@@ -812,5 +820,5 @@
     }
   }
-  if (has_colors()) {
+  if (owl_global_get_hascolors(&g)) {
     for(i = 0; i < 8; i++) {
       short fg, bg;
@@ -827,7 +835,4 @@
   owl_colorpair_mgr *cpmgr;
   short pair;
-
-  if (!has_colors())
-    return 0;
 
   /* Sanity (Bounds) Check */
@@ -847,5 +852,5 @@
   if (!(pair != -1 && pair < cpmgr->next)) {
     /* If we didn't find a pair, search for a free one to assign. */
-    pair = (cpmgr->next < owl_util_get_colorpairs()) ? cpmgr->next : -1;
+    pair = (cpmgr->next < COLOR_PAIRS) ? cpmgr->next : -1;
     if (pair != -1) {
       /* We found a free pair, initialize it. */
Index: functions.c
===================================================================
--- functions.c	(revision 7b4f3bea704ed82f2c36ba19fcf354d7442a5bb7)
+++ functions.c	(revision 4fd211f3a533efcedaf4d0dc7c01e02087ad2e39)
@@ -1817,7 +1817,7 @@
 	  owl_global_get_cols(&g));
 
-  if (has_colors()) {
+  if (owl_global_get_hascolors(&g)) {
     owl_fmtext_append_normal(&fm, "Color: Yes\n");
-    owl_fmtext_appendf_normal(&fm, "Number of color pairs: %i\n", owl_util_get_colorpairs());
+    owl_fmtext_appendf_normal(&fm, "Number of color pairs: %i\n", owl_global_get_colorpairs(&g));
     owl_fmtext_appendf_normal(&fm, "Can change colors: %s\n", can_change_color() ? "yes" : "no");
   } else {
@@ -2226,7 +2226,9 @@
     f = fl->data;
     owl_fmtext_append_normal(&fm, "   ");
-    owl_fmtext_append_normal_color(&fm, owl_filter_get_name(f),
-                                   owl_filter_get_fgcolor(f),
-                                   owl_filter_get_bgcolor(f));
+    if (owl_global_get_hascolors(&g)) {
+      owl_fmtext_append_normal_color(&fm, owl_filter_get_name(f), owl_filter_get_fgcolor(f), owl_filter_get_bgcolor(f));
+    } else {
+      owl_fmtext_append_normal(&fm, owl_filter_get_name(f));
+    }
     owl_fmtext_append_normal(&fm, "\n");
   }
Index: global.c
===================================================================
--- global.c	(revision 7b4f3bea704ed82f2c36ba19fcf354d7442a5bb7)
+++ global.c	(revision 47e0a6a50d1c08ec05030b2507b3f1a84b618a9f)
@@ -51,4 +51,8 @@
   g->direction=OWL_DIRECTION_DOWNWARDS;
   g->zaway=0;
+  if (has_colors()) {
+    g->hascolors=1;
+  }
+  g->colorpairs=COLOR_PAIRS;
   owl_fmtext_init_colorpair_mgr(&(g->cpmgr));
   g->debug=OWL_DEBUG;
@@ -570,4 +574,17 @@
 owl_view *owl_global_get_current_view(owl_global *g) {
   return(&(g->current_view));
+}
+
+/* has colors */
+
+int owl_global_get_hascolors(const owl_global *g) {
+  if (g->hascolors) return(1);
+  return(0);
+}
+
+/* color pairs */
+
+int owl_global_get_colorpairs(const owl_global *g) {
+  return(g->colorpairs);
 }
 
Index: owl.c
===================================================================
--- owl.c	(revision 9efa5bd38b986cf116a08ae43aa3f8629dcc6e60)
+++ owl.c	(revision a2a883313ecb42f7eb3fc95a46c710acb4a171ea)
@@ -444,12 +444,11 @@
   /* update the terminal if we need to */
   owl_window_redraw_scheduled();
-  /* On colorpair shortage, reset and redraw /everything/. NOTE: if we
-   * still overflow, this be useless work. With 8-colors, we get 64
-   * pairs. With 256-colors, we get 32768 pairs with ext-colors
-   * support and 256 otherwise. */
+  /* On colorpair shortage, reset and redraw /everything/. NOTE: if
+   * the current screen uses too many colorpairs, this draws
+   * everything twice. But this is unlikely; COLOR_PAIRS is 64 with
+   * 8+1 colors, and 256^2 with 256+1 colors. (+1 for default.) */
   cpmgr = owl_global_get_colorpair_mgr(&g);
   if (cpmgr->overflow) {
-    owl_function_debugmsg("colorpairs: used all %d pairs; reset pairs and redraw.",
-                          owl_util_get_colorpairs());
+    owl_function_debugmsg("colorpairs: color shortage; reset pairs and redraw. COLOR_PAIRS = %d", COLOR_PAIRS);
     owl_fmtext_reset_colorpairs(cpmgr);
     owl_function_full_redisplay();
Index: owl.h
===================================================================
--- owl.h	(revision 7b4f3bea704ed82f2c36ba19fcf354d7442a5bb7)
+++ owl.h	(revision 283ff1e64b51f85106ca81c14d56df397f503009)
@@ -610,4 +610,6 @@
   char *startupargs;
   int nextmsgid;
+  int hascolors;
+  int colorpairs;
   owl_colorpair_mgr cpmgr;
   pid_t newmsgproc_pid;
Index: util.c
===================================================================
--- util.c	(revision 9efa5bd38b986cf116a08ae43aa3f8629dcc6e60)
+++ util.c	(revision e56303f7b60f05cc30e74453b06725fc031e9384)
@@ -715,15 +715,4 @@
 }
 
-int owl_util_get_colorpairs(void) {
-#ifndef NCURSES_EXT_COLORS
-  /* Without ext-color support (an ABI change), ncurses only supports 256
-   * different color pairs. However, it gives us a larger number even if your
-   * ncurses is compiled without ext-color. */
-  return MIN(COLOR_PAIRS, 256);
-#else
-  return COLOR_PAIRS;
-#endif
-}
-
 gulong owl_dirty_window_on_signal(owl_window *w, gpointer sender, const gchar *detailed_signal)
 {
