diff options
Diffstat (limited to 'src/color.c')
-rw-r--r-- | src/color.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/color.c b/src/color.c index 259027b..1ab5308 100644 --- a/src/color.c +++ b/src/color.c @@ -606,6 +606,11 @@ int define_color(char * color, int r, int g, int b) { } else if (! has_colors () || ! can_change_color() || COLORS < 9) { sc_error("Could not define color %s. Not supported by terminal.", color); return -1; + + } else if (get(d_colors_param, color) != NULL) { + sc_error("Could not define custom color %s. That is an ncurses color. Use :redefine for that purpose.", color); + return -1; + } else if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) { sc_error("Could not define color %s. One of the RGB values is invalid.", color); return -1; |