From 70dcb6a22abc3b23288e2a6afd124f3a68bd4c99 Mon Sep 17 00:00:00 2001
From: Patrick O'Carroll <ocarroll.patrick@gmail.com>
Date: Mon, 8 Apr 2019 10:52:00 +0200
Subject: [PATCH] Graph: Fixed series legend color for hidden series (#16438)

* replaced colors for headingColor, link and linkDisabled with colors from grayscale, replaced colors for linkDisabled and linkHover with colors from grayscale, changed color for sha-modal-in-text to text-color-empahises

* fixed snapshot
---
 .../__snapshots__/ThresholdsEditor.test.tsx.snap     | 12 ++++++------
 packages/grafana-ui/src/themes/dark.ts               |  7 +++----
 packages/grafana-ui/src/themes/light.ts              |  5 ++---
 public/sass/_variables.dark.generated.scss           |  6 +++---
 public/sass/_variables.light.generated.scss          |  4 ++--
 public/sass/components/_modals.scss                  |  2 +-
 6 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap
index 3b7efcb6e7c..09596e066dd 100644
--- a/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap
+++ b/packages/grafana-ui/src/components/ThresholdsEditor/__snapshots__/ThresholdsEditor.test.tsx.snap
@@ -148,10 +148,10 @@ exports[`Render should render with base threshold 1`] = `
                               "grayBlue": "#212327",
                               "greenBase": "#299c46",
                               "greenShade": "#23843b",
-                              "headingColor": "#e3e3e3",
+                              "headingColor": "#d8d9da",
                               "inputBlack": "#09090b",
-                              "link": "#e3e3e3",
-                              "linkDisabled": "#e3e3e3",
+                              "link": "#d8d9da",
+                              "linkDisabled": "#8e8e8e",
                               "linkExternal": "#33b5e5",
                               "linkHover": "#ffffff",
                               "online": "#299c46",
@@ -311,10 +311,10 @@ exports[`Render should render with base threshold 1`] = `
                                     "grayBlue": "#212327",
                                     "greenBase": "#299c46",
                                     "greenShade": "#23843b",
-                                    "headingColor": "#e3e3e3",
+                                    "headingColor": "#d8d9da",
                                     "inputBlack": "#09090b",
-                                    "link": "#e3e3e3",
-                                    "linkDisabled": "#e3e3e3",
+                                    "link": "#d8d9da",
+                                    "linkDisabled": "#8e8e8e",
                                     "linkExternal": "#33b5e5",
                                     "linkHover": "#ffffff",
                                     "online": "#299c46",
diff --git a/packages/grafana-ui/src/themes/dark.ts b/packages/grafana-ui/src/themes/dark.ts
index 1e424c97154..9bbe3aef04e 100644
--- a/packages/grafana-ui/src/themes/dark.ts
+++ b/packages/grafana-ui/src/themes/dark.ts
@@ -1,4 +1,3 @@
-import tinycolor from 'tinycolor2';
 import defaultTheme from './default';
 import { GrafanaTheme, GrafanaThemeType } from '../types/theme';
 
@@ -66,11 +65,11 @@ const darkTheme: GrafanaTheme = {
     textWeak: basicColors.gray2,
     textEmphasis: basicColors.gray5,
     textFaint: basicColors.dark5,
-    link: new tinycolor(basicColors.white).darken(11).toString(),
-    linkDisabled: new tinycolor(basicColors.white).darken(11).toString(),
+    link: basicColors.gray4,
+    linkDisabled: basicColors.gray2,
     linkHover: basicColors.white,
     linkExternal: basicColors.blue,
-    headingColor: new tinycolor(basicColors.white).darken(11).toString(),
+    headingColor: basicColors.gray4,
   },
   background: {
     dropdown: basicColors.dark3,
diff --git a/packages/grafana-ui/src/themes/light.ts b/packages/grafana-ui/src/themes/light.ts
index 0b36f5eca01..e87bf744f95 100644
--- a/packages/grafana-ui/src/themes/light.ts
+++ b/packages/grafana-ui/src/themes/light.ts
@@ -1,4 +1,3 @@
-import tinycolor from 'tinycolor2';
 import defaultTheme from './default';
 import { GrafanaTheme, GrafanaThemeType } from '../types/theme';
 
@@ -68,8 +67,8 @@ const lightTheme: GrafanaTheme = {
     textEmphasis: basicColors.dark5,
     textFaint: basicColors.dark4,
     link: basicColors.gray1,
-    linkDisabled: new tinycolor(basicColors.gray1).lighten(30).toString(),
-    linkHover: new tinycolor(basicColors.gray1).darken(20).toString(),
+    linkDisabled: basicColors.gray3,
+    linkHover: basicColors.dark1,
     linkExternal: basicColors.blueLight,
     headingColor: basicColors.gray1,
   },
diff --git a/public/sass/_variables.dark.generated.scss b/public/sass/_variables.dark.generated.scss
index 444e9ddee03..abe0af48535 100644
--- a/public/sass/_variables.dark.generated.scss
+++ b/public/sass/_variables.dark.generated.scss
@@ -102,14 +102,14 @@ $edit-gradient: linear-gradient(180deg, $dark-2 50%, $input-black);
 
 // Links
 // -------------------------
-$link-color: #e3e3e3;
-$link-color-disabled: #e3e3e3;
+$link-color: #d8d9da;
+$link-color-disabled: #8e8e8e;
 $link-hover-color: #ffffff;
 $external-link-color: #33b5e5;
 
 // Typography
 // -------------------------
-$headings-color: #e3e3e3;
+$headings-color: #d8d9da;
 $abbr-border-color: $gray-2 !default;
 $text-muted: $text-color-weak;
 
diff --git a/public/sass/_variables.light.generated.scss b/public/sass/_variables.light.generated.scss
index d8bd561a3fd..5bacd817eab 100644
--- a/public/sass/_variables.light.generated.scss
+++ b/public/sass/_variables.light.generated.scss
@@ -89,8 +89,8 @@ $edit-gradient: linear-gradient(-60deg, $gray-7, #f5f6f9 70%, $gray-7 98%);
 // Links
 // -------------------------
 $link-color: #52545c;
-$link-color-disabled: #9ea0a9;
-$link-hover-color: #222326;
+$link-color-disabled: #acb6bf;
+$link-hover-color: #1e2028;
 $external-link-color: #5794f2;
 
 // Typography
diff --git a/public/sass/components/_modals.scss b/public/sass/components/_modals.scss
index 6f87fa8c374..22d1ad68e20 100644
--- a/public/sass/components/_modals.scss
+++ b/public/sass/components/_modals.scss
@@ -153,7 +153,7 @@
   .share-modal-info-text {
     margin-top: 5px;
     strong {
-      color: $headings-color;
+      color: $text-color-emphasis;
       font-weight: 500;
     }
   }