diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-28 23:41:07 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-28 23:41:07 -0300 |
commit | e2651bdff2eac072ed2394f69e2cf59a8c53cdba (patch) | |
tree | 77dc6629a223fcf57d8b6547dde0461940e0244a /packages/taler-wallet-webextension/src/mui/colors | |
parent | f5d194dfc61ae0d358a27b994861dc20b83cf98e (diff) | |
download | wallet-core-e2651bdff2eac072ed2394f69e2cf59a8c53cdba.tar.xz |
add extension to every import
Diffstat (limited to 'packages/taler-wallet-webextension/src/mui/colors')
-rw-r--r-- | packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts | 2 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/mui/colors/manipulation.ts | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts b/packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts index 77b3ec884..192e9f402 100644 --- a/packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts +++ b/packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts @@ -11,7 +11,7 @@ import { getContrastRatio, getLuminance, lighten, -} from './manipulation'; +} from './manipulation.js'; describe('utils/colorManipulator', () => { describe('recomposeColor', () => { diff --git a/packages/taler-wallet-webextension/src/mui/colors/manipulation.ts b/packages/taler-wallet-webextension/src/mui/colors/manipulation.ts index 633c80c94..55d0523b7 100644 --- a/packages/taler-wallet-webextension/src/mui/colors/manipulation.ts +++ b/packages/taler-wallet-webextension/src/mui/colors/manipulation.ts @@ -22,7 +22,7 @@ export interface ColorObjectWithoutAlpha { * @param {number} max The upper boundary of the output range * @returns {number} A number in the range [min, max] */ -function clamp(value: number, min: number = 0, max: number = 1): number { +function clamp(value: number, min = 0, max = 1): number { // if (process.env.NODE_ENV !== 'production') { // if (value < min || value > max) { // console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`); @@ -76,8 +76,8 @@ export function decomposeColor(color: string): ColorObject { const marker = color.indexOf('('); const type = color.substring(0, marker); - if (type != 'rgba' && type != 'hsla' && type != 'rgb' && type != 'hsl') { - } + // if (type != 'rgba' && type != 'hsla' && type != 'rgb' && type != 'hsl') { + // } const values = color.substring(marker + 1, color.length - 1).split(',') if (type == 'rgb' || type == 'hsl') { @@ -268,6 +268,6 @@ export function lighten(color: string, coefficient: number): string { * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ -export function emphasize(color: string, coefficient: number = 0.15): string { +export function emphasize(color: string, coefficient = 0.15): string { return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); } |