Skip to content

lighting front end element

Justin Parker edited this page Nov 17, 2021 · 2 revisions

The <lighting> front-end element

image

  <!-- acting like a simple color picker: -->
  <lighting options='rgb' />
  <!-- example value: "rgb(50, 10, 99)" (as string) -->
  -->
  
  <!-- color w. Kelvin and amber channels -->
  <lighting options='rgbka' />
  <!-- example value: "rgbka(50, 10, 99, 50, 0)" (as string) -->
  -->
  • options attribute WILL/MUST start with the color model part:
    • e.g. rgb, hsb/hsv or hsl
  • when parsing, any missing channels / modifiers can assume to be 0

Color-space model part

RGB model:

  • r - RED (0.0 - 100.0% clamped)
  • g - GREEN (0.0 - 100.0% clamped)
  • b - BLUE (0.0 - 100.0% clamped)

HSB/V model (typically light):

  • h - HUE (mod 360 degrees)
  • s - SATURATION (0.0 - 100.0% clamped)
  • b/v - BRIGHTNESS (0.0 - 100.0% clamped)

HSL model (typically paint):

  • h - HUE (mod 360 degrees)
  • s - SATURATION (0.0 - 100.0% clamped)
  • l - LIGHTNESS (0.0 - 100.0% clamped)

Additional modifiers / channel parts:

  • k - COLOR TEMP (typically 1500 - 9000 clamped max 65535)
  • w - WHITE channel (0 - 100% clamped)
  • a - AMBER channel (0 - 100% clamped)
  • u - U/V channel (0 - 100% clamped)
  • i - INFRARED channel (0 - 100% clamped)