From 8655e8c7bd2ffab8dd9affab42dd6b77fc948c35 Mon Sep 17 00:00:00 2001 From: libertymayc Date: Mon, 22 Apr 2024 10:46:17 -0400 Subject: [PATCH] fix alpha values --- .../theme/json/parsers/colorFormatSwap.js | 2 +- packages/theme/json/theme.json | 100 ++++++++---------- 2 files changed, 47 insertions(+), 55 deletions(-) diff --git a/packages/theme/json/parsers/colorFormatSwap.js b/packages/theme/json/parsers/colorFormatSwap.js index cc4ec3b3c6a..588fe764c3b 100644 --- a/packages/theme/json/parsers/colorFormatSwap.js +++ b/packages/theme/json/parsers/colorFormatSwap.js @@ -25,7 +25,7 @@ module.exports = function colorFormatSwap(swapTo, color) { .replace("rgba(", "") .replace(")", "") .split(",") - .map((x) => parseInt(x.trim())); + .map((x) => parseFloat(x.trim())); a = ((a * 255) | (1 << 8)).toString(16).slice(1).trim(); return rgbToHex(r, g, b) + a; } else { diff --git a/packages/theme/json/theme.json b/packages/theme/json/theme.json index 220a6e21393..a7b96570a4a 100644 --- a/packages/theme/json/theme.json +++ b/packages/theme/json/theme.json @@ -1,14 +1,6 @@ { - "modes": [ - "$light", - "$dark" - ], - "densities": [ - "$high", - "$medium", - "$low", - "$touch" - ], + "modes": ["$light", "$dark"], + "densities": ["$high", "$medium", "$low", "$touch"], "palette": { "accent": { "palette-accent": { @@ -642,36 +634,36 @@ "shadow": { "shadow-100-color": { "$value": { - "$dark": "#00000000", - "$light": "#00000000" + "$dark": "#0000007f", + "$light": "#00000019" }, "$type": "color" }, "shadow-200-color": { "$value": { - "$dark": "#00000000", - "$light": "#00000000" + "$dark": "#0000007f", + "$light": "#00000019" }, "$type": "color" }, "shadow-300-color": { "$value": { - "$dark": "#00000000", - "$light": "#00000000" + "$dark": "#0000008c", + "$light": "#00000026" }, "$type": "color" }, "shadow-400-color": { "$value": { - "$dark": "#00000000", - "$light": "#00000000" + "$dark": "#0000008c", + "$light": "#00000033" }, "$type": "color" }, "shadow-500-color": { "$value": { - "$dark": "#00000000", - "$light": "#00000000" + "$dark": "#000000a5", + "$light": "#0000004c" }, "$type": "color" }, @@ -821,10 +813,10 @@ }, "size-indicator": { "$value": { - "$low": "3px", - "$touch": "4px", - "$medium": "2px", - "$high": "1px" + "$low": "4px", + "$touch": "5px", + "$medium": "3px", + "$high": "2px" }, "$type": "dimension" }, @@ -977,7 +969,7 @@ "$type": "color" }, "color-asphalt-40a": { - "$value": "#18191a00", + "$value": "#18191a66", "$type": "color" }, "color-autumn-400": { @@ -997,23 +989,23 @@ "$type": "color" }, "color-black-15a": { - "$value": "#00000000", + "$value": "#00000026", "$type": "color" }, "color-black-25a": { - "$value": "#00000000", + "$value": "#0000003f", "$type": "color" }, "color-black-40a": { - "$value": "#00000000", + "$value": "#00000066", "$type": "color" }, "color-black-70a": { - "$value": "#00000000", + "$value": "#000000b2", "$type": "color" }, "color-black-8a": { - "$value": "#00000000", + "$value": "#00000014", "$type": "color" }, "color-blue-100": { @@ -1025,7 +1017,7 @@ "$type": "color" }, "color-blue-200-40a": { - "$value": "#a7cbea00", + "$value": "#a7cbea66", "$type": "color" }, "color-blue-300": { @@ -1033,7 +1025,7 @@ "$type": "color" }, "color-blue-300-40a": { - "$value": "#83b0d800", + "$value": "#83b0d866", "$type": "color" }, "color-blue-400": { @@ -1041,7 +1033,7 @@ "$type": "color" }, "color-blue-400-40a": { - "$value": "#5c95c700", + "$value": "#5c95c766", "$type": "color" }, "color-blue-500": { @@ -1049,7 +1041,7 @@ "$type": "color" }, "color-blue-500-40a": { - "$value": "#2b7cb500", + "$value": "#2b7cb566", "$type": "color" }, "color-blue-600": { @@ -1057,7 +1049,7 @@ "$type": "color" }, "color-blue-600-40a": { - "$value": "#1f649400", + "$value": "#1f649466", "$type": "color" }, "color-blue-700": { @@ -1065,7 +1057,7 @@ "$type": "color" }, "color-blue-700-40a": { - "$value": "#134d7500", + "$value": "#134d7566", "$type": "color" }, "color-blue-800": { @@ -1073,7 +1065,7 @@ "$type": "color" }, "color-blue-800-40a": { - "$value": "#07375700", + "$value": "#07375766", "$type": "color" }, "color-blue-900": { @@ -1165,11 +1157,11 @@ "$type": "color" }, "color-gray-300-15a": { - "$value": "#adaeb300", + "$value": "#adaeb326", "$type": "color" }, "color-gray-300-40a": { - "$value": "#adaeb300", + "$value": "#adaeb366", "$type": "color" }, "color-gray-400": { @@ -1177,7 +1169,7 @@ "$type": "color" }, "color-gray-400-40a": { - "$value": "#8f919800", + "$value": "#8f919866", "$type": "color" }, "color-gray-500": { @@ -1185,11 +1177,11 @@ "$type": "color" }, "color-gray-500-15a": { - "$value": "#72757d00", + "$value": "#72757d26", "$type": "color" }, "color-gray-500-40a": { - "$value": "#72757d00", + "$value": "#72757d66", "$type": "color" }, "color-gray-600": { @@ -1197,7 +1189,7 @@ "$type": "color" }, "color-gray-600-40a": { - "$value": "#5b5d6400", + "$value": "#5b5d6466", "$type": "color" }, "color-gray-700": { @@ -1205,11 +1197,11 @@ "$type": "color" }, "color-gray-700-15a": { - "$value": "#45474d00", + "$value": "#45474d26", "$type": "color" }, "color-gray-700-40a": { - "$value": "#45474d00", + "$value": "#45474d66", "$type": "color" }, "color-gray-800": { @@ -1309,7 +1301,7 @@ "$type": "color" }, "color-mist-40a": { - "$value": "#f2f4f600", + "$value": "#f2f4f666", "$type": "color" }, "color-ocean-400": { @@ -1329,7 +1321,7 @@ "$type": "color" }, "color-oil-40a": { - "$value": "#27282900", + "$value": "#27282966", "$type": "color" }, "color-olive-400": { @@ -1517,7 +1509,7 @@ "$type": "color" }, "color-snow-40a": { - "$value": "#ffffff00", + "$value": "#ffffff66", "$type": "color" }, "color-teal-100": { @@ -1577,23 +1569,23 @@ "$type": "color" }, "color-white-15a": { - "$value": "#ffffff00", + "$value": "#ffffff26", "$type": "color" }, "color-white-25a": { - "$value": "#ffffff00", + "$value": "#ffffff3f", "$type": "color" }, "color-white-40a": { - "$value": "#ffffff00", + "$value": "#ffffff66", "$type": "color" }, "color-white-70a": { - "$value": "#ffffff00", + "$value": "#ffffffb2", "$type": "color" }, "color-white-8a": { - "$value": "#ffffff00", + "$value": "#ffffff14", "$type": "color" } }, @@ -2309,4 +2301,4 @@ } } } -} \ No newline at end of file +}