Skip to content

Commit

Permalink
fix: Improve explanation readability
Browse files Browse the repository at this point in the history
This PR decreases the intensity of the colors for good readability of words with high values

closes #1774
  • Loading branch information
leiyre committed Nov 2, 2022
1 parent c42f7f2 commit 3348f35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/components/text-classifier/results/RecordExplain.vue
Expand Up @@ -60,7 +60,7 @@ export default {
let percent = Math.round(Math.abs(grad) * 100);
if (percent !== 0) {
/* eslint-disable no-mixed-operators */
const p = 1.5; // color sensitivity (values from 1 to 4)
const p = 1; // color sensitivity (values from 1 to 4)
const s = 100 / Math.log10(100) ** p;
percent = Math.round(Math.log10(percent) ** p * s);
}
Expand Down Expand Up @@ -91,7 +91,7 @@ export default {
margin: auto;
transform: translateY(10px);
position: absolute;
bottom: 5px;
bottom: 4px;
right: 0;
left: 0;
}
Expand All @@ -110,7 +110,7 @@ export default {
}
}
.grad-neg-#{$i} {
$bg: hsla(200, 60%, 100% - $i * 0.5, 1);
$bg: hsla(200, 60%, 100% - $i * 0.5, 0.5);
@extend %grad;
background: $bg;
.atom__tooltip {
Expand All @@ -132,7 +132,7 @@ export default {
}
}
.grad-rest-#{$i} {
$bg: hsla(0, 80%, 100% - $i * 0.5, 1);
$bg: hsla(0, 80%, 100% - $i * 0.5, 0.5);
@extend %grad;
background: $bg;
.atom__tooltip {
Expand Down

0 comments on commit 3348f35

Please sign in to comment.