For this case here is a way to do it without making a copy of the graph. Instead it creates a new function to compute the degree.
In [1]: import networkx as nx
In [2]: from collections import defaultdict
In [3]: G = nx.Graph()
In [4]: G.add_edges_from([(1,2),(3,4),(4,5)], color='red')
In [5]: G.add_edges_from([(1,3),(1,4),(2,3)], color='blue')
In [6]: def colored_degree(G, color):
degree = defaultdict(int)
for u,v in ((u,v) for u,v,d in G.edges(data=True) if d['color']==color):
degree[u]+=1
degree[v]+=1
return degree
...:
In [7]: colored_degree(G, 'red')
Out[7]: defaultdict(<type 'int'>, {1: 1, 2: 1, 3: 1, 4: 2, 5: 1})
In [8]: colored_degree(G, 'blue')
Out[8]: defaultdict(<type 'int'>, {1: 2, 2: 1, 3: 2, 4: 1})