summaryrefslogtreecommitdiffstats
path: root/src/functions/colors
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2024-10-09 21:02:02 +0200
committerVolpeon <git@volpeon.ink>2024-10-09 21:02:02 +0200
commit5b8ee49fb4197ff3aee252a33ca12c3b582e5c9a (patch)
tree5519c886be3165f98ba47cc0f9288e004afbeb5f /src/functions/colors
parentReplace Oddbird with native SASS color functions (diff)
downloadiro-design-5b8ee49fb4197ff3aee252a33ca12c3b582e5c9a.tar.gz
iro-design-5b8ee49fb4197ff3aee252a33ca12c3b582e5c9a.tar.bz2
iro-design-5b8ee49fb4197ff3aee252a33ca12c3b582e5c9a.zip
Fix APCA contrast
Diffstat (limited to 'src/functions/colors')
-rw-r--r--src/functions/colors/_apca.scss6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/functions/colors/_apca.scss b/src/functions/colors/_apca.scss
index c848db7..0c03529 100644
--- a/src/functions/colors/_apca.scss
+++ b/src/functions/colors/_apca.scss
@@ -47,7 +47,8 @@ $SA98G: (
47} 47}
48 48
49@function apcaContrast($txtY, $bgY) { 49@function apcaContrast($txtY, $bgY) {
50 $icp: 1.1; 50 /* stylelint-disable-next-line @stylistic/number-no-trailing-zeros */
51 $icp: .0 1.1;
51 52
52 @if math.min($txtY, $bgY) < list.nth($icp, 1) or math.max($txtY, $bgY) > list.nth($icp, 2) { 53 @if math.min($txtY, $bgY) < list.nth($icp, 1) or math.max($txtY, $bgY) > list.nth($icp, 2) {
53 @return 0; 54 @return 0;
@@ -117,8 +118,7 @@ $SA98G: (
117 } 118 }
118 119
119 @if $unknownY <= map.get($SA98G, blkThrs) { 120 @if $unknownY <= map.get($SA98G, blkThrs) {
120 $unknownY: math.pow(($unknownY + map.get($SA98G, mOffsetIn)) * map.get($SA98G, mFactor), 121 $unknownY: math.pow(($unknownY + map.get($SA98G, mOffsetIn)) * map.get($SA98G, mFactor), math.div(map.get($SA98G, mExpAdj), map.get($SA98G, blkClmp))) * math.div(1, map.get($SA98G, mFactor)) - map.get($SA98G, mOffsetOut);
121 math.div(map.get($SA98G, mExpAdj), map.get($SA98G, blkClmp))) * math.div(1, map.get($SA98G, mFactor)) - map.get($SA98G, mOffsetOut);
122 } 122 }
123 123
124 $unknownY: math.max(math.min($unknownY, 1), 0); 124 $unknownY: math.max(math.min($unknownY, 1), 0);