aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph/colors.cc
diff options
context:
space:
mode:
authorGravatar Manjunath Kudlur <keveman@gmail.com>2015-11-06 16:27:58 -0800
committerGravatar Manjunath Kudlur <keveman@gmail.com>2015-11-06 16:27:58 -0800
commitf41959ccb2d9d4c722fe8fc3351401d53bcf4900 (patch)
treeef0ca22cb2a5ac4bdec9d080d8e0788a53ed496d /tensorflow/core/graph/colors.cc
TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation using data flow graphs. Base CL: 107276108
Diffstat (limited to 'tensorflow/core/graph/colors.cc')
-rw-r--r--tensorflow/core/graph/colors.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/tensorflow/core/graph/colors.cc b/tensorflow/core/graph/colors.cc
new file mode 100644
index 0000000000..0eb2fc3740
--- /dev/null
+++ b/tensorflow/core/graph/colors.cc
@@ -0,0 +1,25 @@
+#include "tensorflow/core/graph/colors.h"
+
+#include "tensorflow/core/platform/port.h"
+
+namespace tensorflow {
+
+// Color palette
+// http://www.mulinblog.com/a-color-palette-optimized-for-data-visualization/
+static const char* kColors[] = {
+ "#F15854", // red
+ "#5DA5DA", // blue
+ "#FAA43A", // orange
+ "#60BD68", // green
+ "#F17CB0", // pink
+ "#B2912F", // brown
+ "#B276B2", // purple
+ "#DECF3F", // yellow
+ "#4D4D4D", // gray
+};
+
+const char* ColorFor(int dindex) {
+ return kColors[dindex % TF_ARRAYSIZE(kColors)];
+}
+
+} // namespace tensorflow