Difference between revisions of "Chroma:setColor"

From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2020.6<br/> '''<translate>Class</translate>:''' chroma<br/> === <tr...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
<languages />
 
<languages />
'''<translate>Available since</translate>:''' Gideros 2020.6<br/>
+
'''<translate>Available since</translate>:''' Gideros 2020.7<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/chroma|chroma]]<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/chroma|chroma]]<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate>Basically this sets the colour for the LED at x,y on the device.  Multiple colours increment the x.</translate>
 
<translate>Basically this sets the colour for the LED at x,y on the device.  Multiple colours increment the x.</translate>
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
() = Chroma:setColor(device,x,y,colors,flush)
 
() = Chroma:setColor(device,x,y,colors,flush)
</source>
+
</syntaxhighlight>
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
'''keys''': (text) <translate>Name of they key to set the colour of.</translate><br/>
+
'''device''': (text) <translate>Name of the device, eg keyboard, mouse.</translate><br/>
'''keys''': (table) <translate>Table of key names to set the colour of.</translate><br/>
+
'''x''': (number) <translate>Column number of the device LED.</translate><br/>
 +
'''y''': (number) <translate>Row number (if any) of the device, ignored in single row devices.</translate><br/>
 
'''colours''': (number) <translate>BGR colour value.</translate><br/>
 
'''colours''': (number) <translate>BGR colour value.</translate><br/>
 
'''colours''': (table) <translate>Multiple BGR colour values.</translate><br/>
 
'''colours''': (table) <translate>Multiple BGR colour values.</translate><br/>

Latest revision as of 15:27, 13 July 2023


Available since: Gideros 2020.7
Class: chroma

Description

Basically this sets the colour for the LED at x,y on the device. Multiple colours increment the x.

() = Chroma:setColor(device,x,y,colors,flush)

Parameters

device: (text) Name of the device, eg keyboard, mouse.
x: (number) Column number of the device LED.
y: (number) Row number (if any) of the device, ignored in single row devices.
colours: (number) BGR colour value.
colours: (table) Multiple BGR colour values.
flush: (bool) True to send the colours to the device, default false. optional

Return values