MCPcopy Create free account
hub / github.com/bernaferrari/FigmaToCode / isDarkFigmaBackground

Function isDarkFigmaBackground

apps/plugin/ui-src/App.tsx:30–40  ·  view source on GitHub ↗
(background: string)

Source from the content-addressed store, hash-verified

28
29const emptyPreview = { size: { width: 0, height: 0 }, content: "" };
30const isDarkFigmaBackground = (background: string) => {
31 const value = background.trim().toLowerCase();
32
33 return Boolean(
34 value &&
35 value !== "#fff" &&
36 value !== "#ffffff" &&
37 value !== "rgb(255, 255, 255)" &&
38 value !== "rgba(255, 255, 255, 1)",
39 );
40};
41
42export default function App() {
43 const [state, setState] = useState<AppState>({

Callers 1

AppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected