Skip to content

Commit

Permalink
Fix #6516: removed unused codes (#6517)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekl0w authored May 1, 2024
1 parent e6d75fd commit 2785549
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions components/lib/colorpicker/ColorPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,6 @@ export const ColorPicker = React.memo(
hsbValue.current = toHSB(value);
};

const areHSBEqual = (val1, val2) => {
return val1.h === val2.h && val1.s === val2.s && val1.b === val2.b;
};

const onChange = (value) => {
if (props.onChange) {
props.onChange({
Expand Down Expand Up @@ -336,31 +332,6 @@ export const ColorPicker = React.memo(
};
};

const validateRGB = (rgb) => {
return {
r: Math.min(255, Math.max(0, rgb.r)),
g: Math.min(255, Math.max(0, rgb.g)),
b: Math.min(255, Math.max(0, rgb.b))
};
};

const validateHEX = (hex) => {
let len = 6 - hex.length;

if (len > 0) {
let o = [];

for (let i = 0; i < len; i++) {
o.push('0');
}

o.push(hex);
hex = o.join('');
}

return hex;
};

const HEXtoRGB = (hex) => {
const hexValue = parseInt(hex.indexOf('#') > -1 ? hex.substring(1) : hex, 16);

Expand Down

0 comments on commit 2785549

Please sign in to comment.