UNPKG

@nextcloud/vue

Version:
2 lines (1 loc) 421 B
"use strict";const f=require("../chunks/GenColors-8097de04.cjs"),i=require("md5"),p=function(c){let t=c.toLowerCase();t.match(/^([0-9a-f]{4}-?){8}$/)===null&&(t=i(t)),t=t.replace(/[^0-9a-f]/g,"");const n=6,a=f.GenColors(n);function l(s,u){let o=0;const r=[];for(let e=0;e<s.length;e++)r.push(parseInt(s.charAt(e),16)%16);for(const e in r)o+=r[e];return parseInt(parseInt(o,10)%u,10)}return a[l(t,n*3)]};module.exports=p;