修复或屏蔽编译错误。
This commit is contained in:
@@ -1,23 +1,14 @@
|
||||
import { useMemo } from 'react';
|
||||
import { HctDiffference } from '../../color_functions/color_module';
|
||||
import { Differ, HctDiffference } from '../../color_functions/color_module';
|
||||
import { useColorFunction } from '../../ColorFunctionContext';
|
||||
import styles from './CompareLayout.module.css';
|
||||
import { CompareMethodProps } from './share-props';
|
||||
|
||||
const defaultCompareResult: HctDiffference = {
|
||||
hue: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
chroma: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
lightness: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
};
|
||||
const defaultCompareResult: HctDiffference = new HctDiffference(
|
||||
new Differ(0, 0),
|
||||
new Differ(0, 0),
|
||||
new Differ(0, 0),
|
||||
);
|
||||
|
||||
export function HCTCompare({
|
||||
basic = '000000',
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
import { useMemo } from 'react';
|
||||
import { HSLDifference } from '../../color_functions/color_module';
|
||||
import { Differ, HSLDifference } from '../../color_functions/color_module';
|
||||
import { useColorFunction } from '../../ColorFunctionContext';
|
||||
import styles from './CompareLayout.module.css';
|
||||
import { CompareMethodProps } from './share-props';
|
||||
|
||||
const defaultCompareResult: HSLDifference = {
|
||||
hue: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
saturation: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
lightness: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
};
|
||||
const defaultCompareResult: HSLDifference = new HSLDifference(
|
||||
new Differ(0, 0),
|
||||
new Differ(0, 0),
|
||||
new Differ(0, 0),
|
||||
);
|
||||
|
||||
export function HSLCompare({
|
||||
basic = '000000',
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
import { useMemo } from 'react';
|
||||
import { OklchDifference } from '../../color_functions/color_module';
|
||||
import { Differ, OklchDifference } from '../../color_functions/color_module';
|
||||
import { useColorFunction } from '../../ColorFunctionContext';
|
||||
import styles from './CompareLayout.module.css';
|
||||
import { CompareMethodProps } from './share-props';
|
||||
|
||||
const defaultCompareResult: OklchDifference = {
|
||||
hue: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
chroma: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
lightness: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
};
|
||||
const defaultCompareResult: OklchDifference = new OklchDifference(
|
||||
new Differ(0, 0),
|
||||
new Differ(0, 0),
|
||||
new Differ(0, 0),
|
||||
);
|
||||
|
||||
export function OklchCompare({
|
||||
basic = '000000',
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
import { useMemo } from 'react';
|
||||
import { RGBDifference } from '../../color_functions/color_module';
|
||||
import { Differ, RGBDifference } from '../../color_functions/color_module';
|
||||
import { useColorFunction } from '../../ColorFunctionContext';
|
||||
import styles from './CompareLayout.module.css';
|
||||
import { CompareMethodProps } from './share-props';
|
||||
|
||||
const defaultCompareResult: RGBDifference = {
|
||||
r: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
g: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
b: {
|
||||
delta: 0,
|
||||
percent: 0,
|
||||
},
|
||||
};
|
||||
const defaultCompareResult: RGBDifference = new RGBDifference(
|
||||
new Differ(0, 0),
|
||||
new Differ(0, 0),
|
||||
new Differ(0, 0),
|
||||
);
|
||||
|
||||
export function RGBCompare({
|
||||
basic = '000000',
|
||||
|
||||
@@ -5,12 +5,7 @@ import { useColorFunction } from '../../ColorFunctionContext';
|
||||
import styles from './CompareLayout.module.css';
|
||||
import { CompareMethodProps } from './share-props';
|
||||
|
||||
const defaultMixResult: MixReversing = {
|
||||
r_factor: 0,
|
||||
g_factor: 0,
|
||||
b_factor: 0,
|
||||
average: 0,
|
||||
};
|
||||
const defaultMixResult: MixReversing = new MixReversing(0, 0, 0, 0);
|
||||
|
||||
export function ShadeScale({ basic = '000000', compare = '000000' }: CompareMethodProps) {
|
||||
const { colorFn } = useColorFunction();
|
||||
|
||||
@@ -5,12 +5,7 @@ import { useColorFunction } from '../../ColorFunctionContext';
|
||||
import styles from './CompareLayout.module.css';
|
||||
import { CompareMethodProps } from './share-props';
|
||||
|
||||
const defaultMixResult: MixReversing = {
|
||||
r_factor: 0,
|
||||
g_factor: 0,
|
||||
b_factor: 0,
|
||||
average: 0,
|
||||
};
|
||||
const defaultMixResult: MixReversing = new MixReversing(0, 0, 0, 0);
|
||||
|
||||
export function TintScale({ basic = '000000', compare = '000000' }: CompareMethodProps) {
|
||||
const { colorFn } = useColorFunction();
|
||||
|
||||
Reference in New Issue
Block a user