// Function to check if a color is in the "white range"
function isWhiteRange(color: string): boolean {
	// Convert the color to RGB using substring instead of substr
	const r = parseInt(color.substring(1, 3), 16);
	const g = parseInt(color.substring(3, 5), 16);
	const b = parseInt(color.substring(5, 7), 16);

	// Define a threshold for what counts as "white"
	const threshold = 200;

	// Check if the color is light (in the white range)
	return r > threshold && g > threshold && b > threshold;
}

export default isWhiteRange
