Packages

Advanced configurable navigation component for Phoenix LiveView with native DaisyUI integration, Tailwind CSS support, permissions filtering, dropdowns, mega menus, and modern responsive design. Optimized for Phoenix 1.8+ and LiveView 1.1+.

Current section

Files

Jump to
navbuddy assets node_modules culori src rgb parseHex.js
Raw

assets/node_modules/culori/src/rgb/parseHex.js

import parseNumber from './parseNumber.js';
const hex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;
const parseHex = color => {
let match;
// eslint-disable-next-line no-cond-assign
return (match = color.match(hex))
? parseNumber(parseInt(match[1], 16), match[1].length)
: undefined;
};
export default parseHex;