Skip to content

Commit

Permalink
[BSv5] YIQ color - final changes (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jan 24, 2023
1 parent 4bd3581 commit 90e0ffa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions assets/scss/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@mixin palette-variant($color-name, $color-value) {
$text-color: color-contrast($color-value);
$link-color: mix($blue, $text-color, lightness($color-value));

$link-hover-color: rgba($link-color, .5) !default;

.-bg-#{$color-name} {
Expand All @@ -12,7 +12,7 @@

// Make links in paragraphs stand out more.
@include link-variant(".-bg-#{$color-name} p > a", $link-color, $link-hover-color, false);


.-text-#{$color-name} {
color: $color-value;
Expand All @@ -35,7 +35,7 @@
@for $i from 1 through length($td-box-colors) {
$value: nth($td-box-colors, $i);
$name: $i - 1;
$text-color: color-yiq($value);
$text-color: color-contrast($value);

@include palette-variant($name, $value);
}
3 changes: 0 additions & 3 deletions assets/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,3 @@ $navbar-dark-color: rgba($white, 0.75) !default;
$navbar-dark-hover-color: rgba($white, 0.5) !default;
$navbar-dark-active-color: $white !default;
$navbar-dark-disabled-color: rgba($white, 0.25) !default;

// The yiq lightness value that determines when the lightness of color changes from "dark" to "light".
$yiq-contrasted-threshold: 200 !default;

0 comments on commit 90e0ffa

Please sign in to comment.