{"product":"edge-apps","releases":[{"date":"2026-08-19","entries":[{"areas":["developers"],"breaking":false,"content_html":"\u003cp\u003eYour app doesn\u0026rsquo;t choose the accent color. Each customer sets their own in \u003ccode\u003escreenly_color_accent\u003c/code\u003e,\nand the same app has to put readable text on a pale yellow brand and on a navy one.\n\u003ccode\u003eisLightColor()\u003c/code\u003e tells you which you\u0026rsquo;re dealing with:\u003c/p\u003e\n\u003cdiv class=\"code-block\"\u003e\n  \u003cbutton type=\"button\" class=\"code-copy\" aria-label=\"Copy code\" data-copy-code\u003e\n    \u003csvg data-copy viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"\u003e\n      \u003crect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\"\u003e\u003c/rect\u003e\n      \u003cpath d=\"M5 15V5a2 2 0 0 1 2-2h10\"\u003e\u003c/path\u003e\n    \u003c/svg\u003e\n    \u003csvg data-check viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"\u003e\n      \u003cpath d=\"M20 6 9 17l-5-5\"\u003e\u003c/path\u003e\n    \u003c/svg\u003e\n  \u003c/button\u003e\n  \u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-typescript\" data-lang=\"typescript\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#6ab825;font-weight:bold\"\u003eimport\u003c/span\u003e { isLightColor, setupTheme } \u003cspan style=\"color:#6ab825;font-weight:bold\"\u003efrom\u003c/span\u003e \u003cspan style=\"color:#ed9d13\"\u003e\u0026#39;@screenly/edge-apps\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#6ab825;font-weight:bold\"\u003econst\u003c/span\u003e { primary } = setupTheme()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#24909d\"\u003edocument\u003c/span\u003e.body.classList.toggle(\u003cspan style=\"color:#ed9d13\"\u003e\u0026#39;on-light-brand\u0026#39;\u003c/span\u003e, isLightColor(primary))\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eIt returns \u003ccode\u003etrue\u003c/code\u003e when a color needs dark text and \u003ccode\u003efalse\u003c/code\u003e when it needs light text. The answer\ncomes from the WCAG relative luminance formula rather than an average of the red, green, and blue\nvalues, so it ranks colors the way people see them. Pure yellow and pure blue have similar channel\ntotals and land on opposite sides.\u003c/p\u003e\n\u003cp\u003eIt accepts hex (\u003ccode\u003e#abc\u003c/code\u003e, \u003ccode\u003e#aabbcc\u003c/code\u003e, \u003ccode\u003e#aabbccdd\u003c/code\u003e) and numeric \u003ccode\u003ergb()\u003c/code\u003e or \u003ccode\u003ergba()\u003c/code\u003e strings, and\nignores alpha. Named colors and percentage channels aren\u0026rsquo;t supported. Anything it can\u0026rsquo;t read\nreturns \u003ccode\u003efalse\u003c/code\u003e instead of throwing, so a malformed setting can\u0026rsquo;t stop a screen from rendering.\u003c/p\u003e\n","description":"isLightColor tells an Edge App whether a color needs dark text on top of it, so text on a customer's accent color stays readable whether the brand is pale or deep.","title":"A new isLightColor helper picks readable text for any brand color","type":"release","url":"https://www.screenly.io/releases/edge-apps/1.5.0/is-light-color/"}],"json":"https://www.screenly.io/releases/edge-apps/1.5.0/v1.json","product":"edge-apps","product_label":"Edge Apps library","url":"https://www.screenly.io/releases/edge-apps/1.5.0/","version":"1.5.0"}],"title":"Edge Apps library 1.5.0","url":"https://www.screenly.io/releases/edge-apps/1.5.0/","version":1}