Jump to content

API Component.Property.SetColor: Difference between revisions

From Flowcode Help
JonnyW (talk | contribs)
XML import
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<sidebar>API Contents</sidebar>
{| class="mtx-class-macrotable wikitable"
Sets a components 'color' property as a R,G,B value
|-
 
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
<div style="width:25%; float:right" class="toc">
| width="90%" class="mtx-class-macrohead" | '''SetColor'''
====Class hierarchy====
|-
[[API Component|Component]]
| colspan="2" | Sets a components 'color' property as a R,G,B value&nbsp;
:[[API Component.Property|Property]]
|-
::[[API Component.Property|SetColor]]
|-
</div>
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
__TOC__
| width="90%" | Handle
 
|-
==Parameters==
| colspan="2" | The component handle of the property owner&nbsp;
[[Variable Types|HANDLE]] ''Handle''
|-
:The component handle of the property owner
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Red
[[Variable Types|BYTE]] ''Red''
|-
:The 0-255 red part of the colour
| colspan="2" | The 0-255 red part of the colour&nbsp;
 
|-
[[Variable Types|BYTE]] ''Green''
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
:The 0-255 green part of the colour
| width="90%" | Green
 
|-
[[Variable Types|BYTE]] ''Blue''
| colspan="2" | The 0-255 green part of the colour&nbsp;
:The 0-255 blue part of the colour
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Blue
==Return value==
|-
''This call does not return a value''
| colspan="2" | The 0-255 blue part of the colour&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - NONE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




Line 38: Line 42:
===Calling in a calculation===
===Calling in a calculation===
* Add to a calculation icon: <pre class="brush:[cpp]">::Component.Property.SetColor(handle, red, green, blue)</pre>
* Add to a calculation icon: <pre class="brush:[cpp]">::Component.Property.SetColor(handle, red, green, blue)</pre>
''<span style="color:red;">No additional examples</span>''

Latest revision as of 14:11, 13 July 2026

SetColor
Sets a components 'color' property as a R,G,B value 
- HANDLE Handle
The component handle of the property owner 
- BYTE Red
The 0-255 red part of the colour 
- BYTE Green
The 0-255 green part of the colour 
- BYTE Blue
The 0-255 blue part of the colour 
- NONE Return


Detailed description

This is a helper function that takes the red, green and blue values form 0-255 and calls SetValue with the property name "color" and the argument the RGB value built from this calls arguments.


No check is made to see if the target Handle has a property called "color", and no error is returned if it does not.


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Component.Property.SetColor(handle, red, green, blue)