Skip to main content
Glama
EditingPill.vue720 B
<template> <div class="p-3xs m-0 rounded text-xs font-bold max-h-fit" :style="{ backgroundColor: $props.color, color: `#${text.toHex()}`, }" > Working Copy </div> </template> <script lang="ts" setup> import { computed, watch, ref } from "vue"; import tinycolor from "tinycolor2"; const props = defineProps({ color: { type: String }, }); const primaryColor = ref(tinycolor("000000")); watch( () => props.color, () => { primaryColor.value = tinycolor(props.color ?? "000000"); }, { immediate: true }, ); const text = computed(() => { const textBgHsl = primaryColor.value.toHsl(); textBgHsl.l = textBgHsl.l > 0.5 ? 0 : 1; return tinycolor(textBgHsl); }); </script>

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server