summaryrefslogtreecommitdiff
path: root/python/highlight.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2018-06-04 14:12:26 -0400
committerRusty Wagner <rusty@vector35.com>2018-06-04 14:12:26 -0400
commitbfa6fce83383e7be1458a917f8e6dbf71bdab28b (patch)
tree58f7d373f6298bbbac70911cd661627b316c011b /python/highlight.py
parentc09ae6ce7bd652dbb6e1a4f73d5a8a51440ec1ff (diff)
Generic flow graph API and report collections
Diffstat (limited to 'python/highlight.py')
-rw-r--r--python/highlight.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/highlight.py b/python/highlight.py
index 96bc543d..87329202 100644
--- a/python/highlight.py
+++ b/python/highlight.py
@@ -110,3 +110,13 @@ class HighlightColor(object):
result.b = self.blue
return result
+
+ @staticmethod
+ def _from_core_struct(color):
+ if color.style == HighlightColorStyle.StandardHighlightColor:
+ return HighlightColor(color=color.color, alpha=color.alpha)
+ elif color.style == HighlightColorStyle.MixedHighlightColor:
+ return HighlightColor(color=color.color, mix_color=color.mixColor, mix=color.mix, alpha=color.alpha)
+ elif color.style == HighlightColorStyle.CustomHighlightColor:
+ return HighlightColor(red=color.r, green=color.g, blue=color.b, alpha=color.alpha)
+ return HighlightColor(color=HighlightStandardColor.NoHighlightColor)