Frontend for the RGB Panel project.

Usage no npm install needed!

<script type="module">
  import agenceWebupRgbPanelFrontend from 'https://cdn.skypack.dev/@agence-webup/rgb-panel-frontend';



Frontend for the RGB Panel project.

Written in vanilla JS & HTML/CSS.

Uses a rgb-panel-api endpoint to send drawings and text for display on an RGB panel.

local dev

npm install
npm run dev


In your own project

If your project already uses npm you can simply add the frontend library to your dependencies

npm i @agence-webup/rgb-panel-frontend

Copy the dist/ folder to your public web directory, either using a build tool such as Gulp or manually.

Now we need to set up a page to use the library. The following code is merely an example:

<!DOCTYPE html>
<html lang="fr">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="webup-rgb-panel.css">
    html {
      font-size: 62.5%;
      font-size: calc(1em * 0.625);
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    .ma {
        margin-top: 2rem;
    <h1>Webup RGB Panel</h1>
    <div class="rgbpanel">
        <div class="rgbpanel__tools" data-rgbpanel-tools></div>
        <canvas id="panel" width="832" height="416" class="rgbpanel__canvas" 
    <div class="ma">
      <button data-send>Envoyer</button>
      <button data-clear>Effacer</button>
    <script src="webup-rgb-panel.js"></script>
        let webupRGBPanel = new WebupRGBPanel(

        document.querySelector('[data-send]').addEventListener('click', () => {

        document.querySelector('[data-clear]').addEventListener('click', () => {

Note: If you've deployed rgb-panel-worker using ZEIT functions, don't forget to specify /api at the end of the URL you provide. If you're using the Express server, you can simply specify the URL. Notice there should not be any trailing slash.