As per the following question on Unix StackExchange, the color scheme for man pages is based on the environment variables settings passed to the pager.
For less these are the less termcap variables which are described in the following question on Unix StackExchange
A simple solution to your problem a shellscript that looks something like
#!/bin/bash
mancommand=`man -d $1 2>&1 | tail -1`
parts=( $mancommand );
path=${parts[8]};
if [[ $path == */usr/share/man/* ]]
then
# One colour scheme
LESS_TERMCAP_mb=$'\E[01;31m' \
LESS_TERMCAP_md=$'\E[01;38;5;74m' \
LESS_TERMCAP_me=$'\E[0m' \
LESS_TERMCAP_se=$'\E[0m' \
LESS_TERMCAP_so=$'\E[38;5;246m' \
LESS_TERMCAP_ue=$'\E[0m' \
LESS_TERMCAP_us=$'\E[04;38;5;146m' eval $mancommand
else
# Second colour scheme
LESS_TERMCAP_mb=$(tput bold; tput setaf 2) \
LESS_TERMCAP_md=$(tput bold; tput setaf 6) \
LESS_TERMCAP_me=$(tput sgr0) \
LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) \
LESS_TERMCAP_se=$(tput rmso; tput sgr0) \
LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) \
LESS_TERMCAP_ue=$(tput rmul; tput sgr0) \
LESS_TERMCAP_mr=$(tput rev) \
LESS_TERMCAP_mh=$(tput dim) \
LESS_TERMCAP_ZN=$(tput ssubm) \
LESS_TERMCAP_ZV=$(tput rsubm) \
LESS_TERMCAP_ZO=$(tput ssupm) \
LESS_TERMCAP_ZW=$(tput rsupm) eval $mancommand
fi