1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| const color = ref('rgba(255, 69, 0, 0.68)') const predefineColors = ref([ '#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#1e90ff', '#c71585', 'rgba(255, 69, 0, 0.68)', 'rgb(255, 120, 0)', 'hsv(51, 100, 98)', 'hsva(120, 40, 94, 0.5)', 'hsl(181, 100%, 37%)', 'hsla(209, 100%, 56%, 0.73)', '#c7158577', ])
const changeDark = () => { let html = document.documentElement dark.value ? (html.className = 'dark') : (html.className = '') }
const setColor = () => { const html = document.documentElement html.style.setProperty('--el-color-primary', color.value) }
|