UpSet.js allow you to color sets in UpSet plots, Venn diagrams, and Karnaugh maps.
from ipywidgets import interact
from upsetjs_jupyter_widget import UpSetJSWidget, UpSetJSVennDiagramWidget, UpSetJSEulerDiagramWidget, UpSetJSKarnaughMapWidget
import pandas as pd
dict_input = dict(s1 = ['a', 'b', 'c', 'e', 'g', 'h', 'k', 'l', 'm'], s2 = ['a', 'b', 'd', 'e', 'j'], s3 = ['a', 'e', 'f', 'g', 'h', 'i', 'j', 'l', 'm'])
colors = {'s1': '#1f77b4', 's2': '#2ca02c', 's3': '#d62728', 's1&s2': '#9467bd', 's1&s3': '#8c564b', 's2&s3': '#e377c2', 's1&s2&s3': '#bcbd22'}
w = UpSetJSWidget[str]()
w.selection_color = ''
w.has_selection_opacity = 0.3
w.from_dict(dict_input, colors=colors)
v = UpSetJSVennDiagramWidget[str]()
v.selection_color = ''
v.has_selection_opacity = 0.3
v.from_dict(dict_input, colors=colors)
e = UpSetJSEulerDiagramWidget[str]()
e.selection_color = ''
e.has_selection_opacity = 0.3
e.from_dict(dict_input, colors=colors)
k = UpSetJSKarnaughMapWidget[str]()
k.selection_color = ''
k.has_selection_opacity = 0.3
k.from_dict(dict_input, colors=colors)