import { computed } from 'vue';
import useControlledState from '../../_util/hooks/useControlledState';
import { generateColor } from '../util';
const useColorState = (defaultValue, value) => {
  const [mergedValue, setValue] = useControlledState(defaultValue, value);
  const color = computed(() => generateColor(mergedValue.value));
  return [color, setValue];
};
export default useColorState;