Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Make colors more readable for exposure tree in light theme
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinVR committed Apr 6, 2020
1 parent fad4ed8 commit 8ee9832
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Assets/UdonSharp/Editor/Editors/UdonTypeExposureTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,15 @@ private void AddChildNode(TreeViewItem parentItem, MemberInfo memberInfo, ref in
{
metadata.rowColor = Color.red;
if (metadata.exposed)
{
metadata.rowColor = Color.green;

if (!EditorGUIUtility.isProSkin)
{
metadata.rowColor = new Color(0.2f, 0.6f, 0.2f);
}
}

if (metadata.isType)
{
Color labelColor = Color.Lerp(Color.red, Color.green, metadata.childExposure);
Expand All @@ -419,6 +426,9 @@ private void AddChildNode(TreeViewItem parentItem, MemberInfo memberInfo, ref in
s = 0.9f;
v = 0.95f;

if (!EditorGUIUtility.isProSkin)
v = 0.6f;

metadata.rowColor = Color.HSVToRGB(h, s, v);

metadata.rowName = metadata.qualifiedRowName = $"({metadata.childExposure * 100f:0.##}%) {item.displayName}";
Expand Down

0 comments on commit 8ee9832

Please sign in to comment.