This repository has been archived on 2026-01-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Acad-IA/src/components/carreras/utils.ts
Alejandro Rosales 5a113ca603 feat: add CarreraDetailDialog and CriterioFormDialog components for managing carrera criteria
feat: implement CarreraFormDialog for creating and editing carreras

feat: create StatusPill component for active/inactive status display

feat: add openContextMenu utility for context menu interactions

feat: add tint utility function for color manipulation

refactor: update archivos route to use font-mono for CardTitle

refactor: update asignaturas route to use font-mono for headings

refactor: update carreras route to modularize components and improve readability

refactor: update dashboard route to use font-mono for CardTitle

refactor: update plan detail route to use font-mono for CardTitle

refactor: update planes route to use font-mono for CardTitle

refactor: update usuarios route to use font-mono for CardTitle

refactor: update login route to use font-mono for CardTitle
2025-09-01 08:43:41 -06:00

11 lines
340 B
TypeScript

export const tint = (hex?: string | null, a = 0.18) => {
if (!hex) return `rgba(37,99,235,${a})`
const h = hex.replace("#", "")
const v = h.length === 3 ? h.split("").map((c) => c + c).join("") : h
const n = parseInt(v, 16)
const r = (n >> 16) & 255,
g = (n >> 8) & 255,
b = n & 255
return `rgba(${r},${g},${b},${a})`
}